From d7d954acb7eb204eeed10cd4494812e9f2e48bd8 Mon Sep 17 00:00:00 2001 From: Sachin Kamat <sachin.kamat@linaro.org> Date: Tue, 12 Nov 2013 15:10:32 -0800 Subject: drivers/rtc/rtc-cmos.c: remove redundant dev_set_drvdata Driver core sets the driver data to NULL upon device_release or on probe failure. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> --- drivers/rtc/rtc-cmos.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/rtc/rtc-cmos.c') diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 24e733c98f8..79680b1d4d7 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -789,7 +789,6 @@ static void __exit cmos_do_remove(struct device *dev) cmos->iomem = NULL; cmos->dev = NULL; - dev_set_drvdata(dev, NULL); } #ifdef CONFIG_PM -- cgit v1.2.3-70-g09d2 From 97a92e77ca5d3d899619282e3f4cbb94e3162251 Mon Sep 17 00:00:00 2001 From: Jingoo Han <jg1.han@samsung.com> Date: Tue, 12 Nov 2013 15:10:38 -0800 Subject: drivers/rtc/rtc-cmos.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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> --- drivers/rtc/rtc-cmos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/rtc/rtc-cmos.c') diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 79680b1d4d7..f14876256a4 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -595,7 +595,7 @@ static irqreturn_t cmos_interrupt(int irq, void *p) static int INITSECTION cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) { - struct cmos_rtc_board_info *info = dev->platform_data; + struct cmos_rtc_board_info *info = dev_get_platdata(dev); int retval = 0; unsigned char rtc_control; unsigned address_space; -- cgit v1.2.3-70-g09d2