diff options
Diffstat (limited to 'drivers/hwmon/emc1403.c')
-rw-r--r-- | drivers/hwmon/emc1403.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index 270ffab711cb..149dcb0e148f 100644 --- a/drivers/hwmon/emc1403.c +++ b/drivers/hwmon/emc1403.c | |||
@@ -41,8 +41,10 @@ | |||
41 | struct thermal_data { | 41 | struct thermal_data { |
42 | struct device *hwmon_dev; | 42 | struct device *hwmon_dev; |
43 | struct mutex mutex; | 43 | struct mutex mutex; |
44 | /* Cache the hyst value so we don't keep re-reading it. In theory | 44 | /* |
45 | we could cache it forever as nobody else should be writing it. */ | 45 | * Cache the hyst value so we don't keep re-reading it. In theory |
46 | * we could cache it forever as nobody else should be writing it. | ||
47 | */ | ||
46 | u8 cached_hyst; | 48 | u8 cached_hyst; |
47 | unsigned long hyst_valid; | 49 | unsigned long hyst_valid; |
48 | }; | 50 | }; |
@@ -283,8 +285,10 @@ static int emc1403_detect(struct i2c_client *client, | |||
283 | case 0x23: | 285 | case 0x23: |
284 | strlcpy(info->type, "emc1423", I2C_NAME_SIZE); | 286 | strlcpy(info->type, "emc1423", I2C_NAME_SIZE); |
285 | break; | 287 | break; |
286 | /* Note: 0x25 is the 1404 which is very similar and this | 288 | /* |
287 | driver could be extended */ | 289 | * Note: 0x25 is the 1404 which is very similar and this |
290 | * driver could be extended | ||
291 | */ | ||
288 | default: | 292 | default: |
289 | return -ENODEV; | 293 | return -ENODEV; |
290 | } | 294 | } |
@@ -366,18 +370,7 @@ static struct i2c_driver sensor_emc1403 = { | |||
366 | .address_list = emc1403_address_list, | 370 | .address_list = emc1403_address_list, |
367 | }; | 371 | }; |
368 | 372 | ||
369 | static int __init sensor_emc1403_init(void) | 373 | module_i2c_driver(sensor_emc1403); |
370 | { | ||
371 | return i2c_add_driver(&sensor_emc1403); | ||
372 | } | ||
373 | |||
374 | static void __exit sensor_emc1403_exit(void) | ||
375 | { | ||
376 | i2c_del_driver(&sensor_emc1403); | ||
377 | } | ||
378 | |||
379 | module_init(sensor_emc1403_init); | ||
380 | module_exit(sensor_emc1403_exit); | ||
381 | 374 | ||
382 | MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com"); | 375 | MODULE_AUTHOR("Kalhan Trisal <kalhan.trisal@intel.com"); |
383 | MODULE_DESCRIPTION("emc1403 Thermal Driver"); | 376 | MODULE_DESCRIPTION("emc1403 Thermal Driver"); |