linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: linux-rtc@vger.kernel.org
Cc: "Rasmus Villemoes" <rasmus.villemoes@prevas.dk>,
	"Per Nørgaard Christensen" <per.christensen@prevas.dk>,
	linux-kernel@vger.kernel.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: [PATCH 3/5] rtc: pcf2127: remove unnecessary #ifdef
Date: Tue,  5 May 2020 22:13:08 +0200	[thread overview]
Message-ID: <20200505201310.255145-3-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20200505201310.255145-1-alexandre.belloni@bootlin.com>

There is not point in setting .ioctl to NULL when CONFIG_RTC_INTF_DEV is
not defined because it would not be called anyway.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-pcf2127.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index 136709baaa88..5ac996578523 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -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,
-- 
2.26.2


  parent reply	other threads:[~2020-05-05 20:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 20:13 [PATCH 1/5] rtc: add new VL flag for backup switchover Alexandre Belloni
2020-05-05 20:13 ` [PATCH 2/5] rtc: pcf2127: let the core handle rtc range Alexandre Belloni
2020-05-05 20:13 ` Alexandre Belloni [this message]
2020-05-05 20:13 ` [PATCH 4/5] rtc: pcf2127: set regmap max_register Alexandre Belloni
2020-05-05 20:13 ` [PATCH 5/5] rtc: pcf2127: report battery switch over Alexandre Belloni
2020-05-05 21:30   ` Rasmus Villemoes
2020-05-05 22:09     ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200505201310.255145-3-alexandre.belloni@bootlin.com \
    --to=alexandre.belloni@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=per.christensen@prevas.dk \
    --cc=rasmus.villemoes@prevas.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).