summaryrefslogtreecommitdiffstats
path: root/drivers/aiodev/lm75.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/aiodev/lm75.c')
-rw-r--r--drivers/aiodev/lm75.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/aiodev/lm75.c b/drivers/aiodev/lm75.c
index 8186fd2c2b..8e5948f468 100644
--- a/drivers/aiodev/lm75.c
+++ b/drivers/aiodev/lm75.c
@@ -22,6 +22,7 @@
#define LM75_SHUTDOWN 0x01
enum lm75_type { /* keep sorted in alphabetical order */
+ unknown,
adt75,
ds1775,
ds75,
@@ -109,9 +110,9 @@ static int lm75_probe(struct device_d *dev)
int new, ret;
enum lm75_type kind;
- ret = dev_get_drvdata(dev, (const void **)&kind);
- if (ret)
- return ret;
+ kind = (enum lm75_type)device_get_match_data(dev);
+ if (kind == unknown)
+ return -ENODEV;
data = xzalloc(sizeof(*data));