Commit 75d26f5c authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: pcf8563: remove conditional compilation

Always compile pcf8563_rtc_ioctl as we are sure that CONFIG_RTC_INTF_DEV is
selected on actual kernel configurations.

Link: https://lore.kernel.org/r/20191214220259.621996-8-alexandre.belloni@bootlin.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent d268f4bd
...@@ -276,11 +276,9 @@ static int pcf8563_rtc_set_time(struct device *dev, struct rtc_time *tm) ...@@ -276,11 +276,9 @@ static int pcf8563_rtc_set_time(struct device *dev, struct rtc_time *tm)
9 - PCF8563_REG_SC, buf + PCF8563_REG_SC); 9 - PCF8563_REG_SC, buf + PCF8563_REG_SC);
} }
#ifdef CONFIG_RTC_INTF_DEV
static int pcf8563_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) static int pcf8563_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
{ {
struct pcf8563 *pcf8563 = i2c_get_clientdata(to_i2c_client(dev)); struct pcf8563 *pcf8563 = i2c_get_clientdata(to_i2c_client(dev));
struct rtc_time tm;
switch (cmd) { switch (cmd) {
case RTC_VL_READ: case RTC_VL_READ:
...@@ -295,9 +293,6 @@ static int pcf8563_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long ...@@ -295,9 +293,6 @@ static int pcf8563_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
} }
#else
#define pcf8563_rtc_ioctl NULL
#endif
static int pcf8563_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *tm) static int pcf8563_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *tm)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment