aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ibmaem.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-05-25 14:43:31 -0400
committerJean Delvare <khali@endymion.delvare>2011-05-25 14:43:31 -0400
commit95de3b257516d21af6e0313c7bab119e4f80d6f4 (patch)
tree818026064f6a1602e08521f5adaed3aed6313013 /drivers/hwmon/ibmaem.c
parentbc1f419c76a2d6450413ce4349f4e4a07be011d5 (diff)
hwmon: Use helper functions to set and get driver data
Use helper functions to set and get driver data. This is more elegant. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/ibmaem.c')
-rw-r--r--drivers/hwmon/ibmaem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c
index bc6e2ab3a361..537409d07ee7 100644
--- a/drivers/hwmon/ibmaem.c
+++ b/drivers/hwmon/ibmaem.c
@@ -523,7 +523,7 @@ static void aem_delete(struct aem_data *data)
523 aem_remove_sensors(data); 523 aem_remove_sensors(data);
524 hwmon_device_unregister(data->hwmon_dev); 524 hwmon_device_unregister(data->hwmon_dev);
525 ipmi_destroy_user(data->ipmi.user); 525 ipmi_destroy_user(data->ipmi.user);
526 dev_set_drvdata(&data->pdev->dev, NULL); 526 platform_set_drvdata(data->pdev, NULL);
527 platform_device_unregister(data->pdev); 527 platform_device_unregister(data->pdev);
528 aem_idr_put(data->id); 528 aem_idr_put(data->id);
529 kfree(data); 529 kfree(data);
@@ -594,7 +594,7 @@ static int aem_init_aem1_inst(struct aem_ipmi_data *probe, u8 module_handle)
594 if (res) 594 if (res)
595 goto ipmi_err; 595 goto ipmi_err;
596 596
597 dev_set_drvdata(&data->pdev->dev, data); 597 platform_set_drvdata(data->pdev, data);
598 598
599 /* Set up IPMI interface */ 599 /* Set up IPMI interface */
600 if (aem_init_ipmi_data(&data->ipmi, probe->interface, 600 if (aem_init_ipmi_data(&data->ipmi, probe->interface,
@@ -630,7 +630,7 @@ sensor_err:
630hwmon_reg_err: 630hwmon_reg_err:
631 ipmi_destroy_user(data->ipmi.user); 631 ipmi_destroy_user(data->ipmi.user);
632ipmi_err: 632ipmi_err:
633 dev_set_drvdata(&data->pdev->dev, NULL); 633 platform_set_drvdata(data->pdev, NULL);
634 platform_device_unregister(data->pdev); 634 platform_device_unregister(data->pdev);
635dev_err: 635dev_err:
636 aem_idr_put(data->id); 636 aem_idr_put(data->id);
@@ -727,7 +727,7 @@ static int aem_init_aem2_inst(struct aem_ipmi_data *probe,
727 if (res) 727 if (res)
728 goto ipmi_err; 728 goto ipmi_err;
729 729
730 dev_set_drvdata(&data->pdev->dev, data); 730 platform_set_drvdata(data->pdev, data);
731 731
732 /* Set up IPMI interface */ 732 /* Set up IPMI interface */
733 if (aem_init_ipmi_data(&data->ipmi, probe->interface, 733 if (aem_init_ipmi_data(&data->ipmi, probe->interface,
@@ -763,7 +763,7 @@ sensor_err:
763hwmon_reg_err: 763hwmon_reg_err:
764 ipmi_destroy_user(data->ipmi.user); 764 ipmi_destroy_user(data->ipmi.user);
765ipmi_err: 765ipmi_err:
766 dev_set_drvdata(&data->pdev->dev, NULL); 766 platform_set_drvdata(data->pdev, NULL);
767 platform_device_unregister(data->pdev); 767 platform_device_unregister(data->pdev);
768dev_err: 768dev_err:
769 aem_idr_put(data->id); 769 aem_idr_put(data->id);