rtc: pcf2127: remove unnecessary #ifdef
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 5 May 2020 20:13:08 +0000 (22:13 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 11 May 2020 14:04:40 +0000 (16:04 +0200)
There is not point in setting .ioctl to NULL when CONFIG_RTC_INTF_DEV is
not defined because it would not be called anyway.

Link: https://lore.kernel.org/r/20200505201310.255145-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pcf2127.c

index 136709baaa88b78a6261665a364c07c59672b98e..5ac996578523896188511c8cd10e28fec7765d61 100644 (file)
@@ -184,7 +184,6 @@ static int pcf2127_rtc_set_time(struct device *dev, struct rtc_time *tm)
        return 0;
 }
 
-#ifdef CONFIG_RTC_INTF_DEV
 static int pcf2127_rtc_ioctl(struct device *dev,
                                unsigned int cmd, unsigned long arg)
 {
@@ -205,9 +204,6 @@ static int pcf2127_rtc_ioctl(struct device *dev,
                return -ENOIOCTLCMD;
        }
 }
-#else
-#define pcf2127_rtc_ioctl NULL
-#endif
 
 static const struct rtc_class_ops pcf2127_rtc_ops = {
        .ioctl          = pcf2127_rtc_ioctl,