]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc-pcf8523-add-low-battery-voltage-support-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Feb 2013 02:15:41 +0000 (13:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:53:24 +0000 (16:53 +1100)
omit pcf8563_rtc_ioctl() if CONFIG_RTC_INTF_DEV=n

Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-pcf8523.c

index 0696ab2b7c57640b6e052745886b771e0ae6b333..889e3160e70138277f651dc0ae401cf891d6005f 100644 (file)
@@ -251,6 +251,7 @@ static int pcf8523_rtc_set_time(struct device *dev, struct rtc_time *tm)
        return pcf8523_start_rtc(client);
 }
 
+#ifdef CONFIG_RTC_INTF_DEV
 static int pcf8523_rtc_ioctl(struct device *dev, unsigned int cmd,
                             unsigned long arg)
 {
@@ -275,6 +276,9 @@ static int pcf8523_rtc_ioctl(struct device *dev, unsigned int cmd,
                return -ENOIOCTLCMD;
        }
 }
+#else
+#define pcf8523_rtc_ioctl NULL
+#endif
 
 static const struct rtc_class_ops pcf8523_rtc_ops = {
        .read_time = pcf8523_rtc_read_time,