diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 16:29:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 16:29:18 -0400 |
commit | 0cd5ff591ab6473355d5a6a47f7694def28e451d (patch) | |
tree | aed0ea4fbb724f13208ed76d438518ffc9130a17 /drivers/hwmon/tmp401.c | |
parent | 3539fc544f39017cf3403b9319fb4d74b5116135 (diff) | |
parent | e30bca12573fbf54e2470723aadc047549d147ce (diff) |
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
"New drivers for DA9052/53 PMIC as well as HIH-6130/HIH-6131 humidity
and temperature sensors.
Convert drivers to use devm_ functions and to use dev_pm_ops. Address
a couple of Coverity errors/warnings as well as compile warnings.
Some functional improvements in applesmc driver."
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (72 commits)
hwmon: (applesmc) Ignore some temperature registers
hwmon: (applesmc) Allow negative temperature values
hwmon: (s3c-hwmon) Use devm_kzalloc instead of kzalloc
hwmon: (w83781d) Fix compile warning
hwmon: (applesmc) Shorten minimum wait time
hwmon: (exynos4_tmu) Use struct dev_pm_ops for power management
hwmon: (gpio-fan) Use struct dev_pm_ops for power management
hwmon: (abituguru3) Use struct dev_pm_ops for power management
hwmon: (abituguru) Use struct dev_pm_ops for power management
hwmon: (acpi_power_meter) Fix unintentional integer overflow
hwmon: (acpi_power_meter) Cleanup and optimizations
hwmon: Honeywell Humidicon HIH-6130/HIH-6131 humidity and temperature sensor driver
hwmon: (applesmc) Skip sensor mapping
hwmon: (ntc_thermistor) Ensure that data->name string is terminated
hwmon: (w83l785ts) Convert to use devm_ functions
hwmon: (w83l785ts) Simplify code and improve readability
hwmon: (smsc47m192) Convert to use devm_ functions
hwmon: (smsc47m1) Convert to use devm_ functions
hwmon: (smsc47b397) Convert to use devm_ functions
hwmon: (k8temp) Convert to use devm_ functions
...
Diffstat (limited to 'drivers/hwmon/tmp401.c')
-rw-r--r-- | drivers/hwmon/tmp401.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c index ea54c3384671..e62054875164 100644 --- a/drivers/hwmon/tmp401.c +++ b/drivers/hwmon/tmp401.c | |||
@@ -594,7 +594,6 @@ static int tmp401_remove(struct i2c_client *client) | |||
594 | &tmp411_attr[i].dev_attr); | 594 | &tmp411_attr[i].dev_attr); |
595 | } | 595 | } |
596 | 596 | ||
597 | kfree(data); | ||
598 | return 0; | 597 | return 0; |
599 | } | 598 | } |
600 | 599 | ||
@@ -605,7 +604,8 @@ static int tmp401_probe(struct i2c_client *client, | |||
605 | struct tmp401_data *data; | 604 | struct tmp401_data *data; |
606 | const char *names[] = { "TMP401", "TMP411" }; | 605 | const char *names[] = { "TMP401", "TMP411" }; |
607 | 606 | ||
608 | data = kzalloc(sizeof(struct tmp401_data), GFP_KERNEL); | 607 | data = devm_kzalloc(&client->dev, sizeof(struct tmp401_data), |
608 | GFP_KERNEL); | ||
609 | if (!data) | 609 | if (!data) |
610 | return -ENOMEM; | 610 | return -ENOMEM; |
611 | 611 | ||
@@ -646,7 +646,7 @@ static int tmp401_probe(struct i2c_client *client, | |||
646 | return 0; | 646 | return 0; |
647 | 647 | ||
648 | exit_remove: | 648 | exit_remove: |
649 | tmp401_remove(client); /* will also free data for us */ | 649 | tmp401_remove(client); |
650 | return err; | 650 | return err; |
651 | } | 651 | } |
652 | 652 | ||