Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: remove some NOP open/release methods

Remove NOP methods from rtc-pl030 and rtc-pl031 drivers;
this is pure wasted code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Brownell and committed by
Linus Torvalds
f841a487 cb49a5e9

-25
-11
drivers/rtc/rtc-pl030.c
··· 34 34 return IRQ_HANDLED; 35 35 } 36 36 37 - static int pl030_open(struct device *dev) 38 - { 39 - return 0; 40 - } 41 - 42 - static void pl030_release(struct device *dev) 43 - { 44 - } 45 - 46 37 static int pl030_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) 47 38 { 48 39 return -ENOIOCTLCMD; ··· 95 104 } 96 105 97 106 static const struct rtc_class_ops pl030_ops = { 98 - .open = pl030_open, 99 - .release = pl030_release, 100 107 .ioctl = pl030_ioctl, 101 108 .read_time = pl030_read_time, 102 109 .set_time = pl030_set_time,
-14
drivers/rtc/rtc-pl031.c
··· 45 45 return IRQ_HANDLED; 46 46 } 47 47 48 - static int pl031_open(struct device *dev) 49 - { 50 - /* 51 - * We request IRQ in pl031_probe, so nothing to do here... 52 - */ 53 - return 0; 54 - } 55 - 56 - static void pl031_release(struct device *dev) 57 - { 58 - } 59 - 60 48 static int pl031_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) 61 49 { 62 50 struct pl031_local *ldata = dev_get_drvdata(dev); ··· 106 118 } 107 119 108 120 static const struct rtc_class_ops pl031_ops = { 109 - .open = pl031_open, 110 - .release = pl031_release, 111 121 .ioctl = pl031_ioctl, 112 122 .read_time = pl031_read_time, 113 123 .set_time = pl031_set_time,