diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-11-05 17:07:02 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-11-05 17:40:22 +1100 |
commit | da66da1fa9328d631cb53d43e5cf68195b9877f5 (patch) | |
tree | 93891a38efec164550c1bcb0ff49faeddb5e8ad9 /drivers | |
parent | e5fc714185ff3ee88af8a8058b03b16216204ac4 (diff) |
drivers/rtc/rtc-hid-sensor-time.c: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change to make
the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rtc/rtc-hid-sensor-time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c index 45560ffb038d..1ba369043b8d 100644 --- a/drivers/rtc/rtc-hid-sensor-time.c +++ b/drivers/rtc/rtc-hid-sensor-time.c @@ -236,7 +236,7 @@ static const struct rtc_class_ops hid_time_rtc_ops = { static int hid_time_probe(struct platform_device *pdev) { int ret = 0; - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); struct hid_time_state *time_state = devm_kzalloc(&pdev->dev, sizeof(struct hid_time_state), GFP_KERNEL); @@ -303,7 +303,7 @@ err_open: static int hid_time_remove(struct platform_device *pdev) { - struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; + struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev); sensor_hub_device_close(hsdev); sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_TIME); |