Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1394125 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-05-04 12:00 +0200 |
| Last post | 2016-05-04 12:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] rtc: rv3029: hide unused i2c device table Arnd Bergmann <arnd@arndb.de> - 2016-05-04 12:00 +0200
Re: [PATCH] rtc: rv3029: hide unused i2c device table Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-05-04 12:10 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-05-04 12:00 +0200 |
| Subject | [PATCH] rtc: rv3029: hide unused i2c device table |
| Message-ID | <rv1L5-1t3-5@gated-at.bofh.it> |
The added support for SPI mode made it possible to configure the driver
when I2C is disabled, leaving an unused device table:
drivers/rtc/rtc-rv3029c2.c:794:29: error: 'rv3029_id' defined but not used [-Werror=unused-variable]
This moves the table inside of the #ifdef section that has the
only user, to avoid the harmless warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d08f50dd0afc ("rtc: rv3029: Add support of RV3049")
---
drivers/rtc/rtc-rv3029c2.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c
index c2ef64fb4757..1f9f7b4bf3fb 100644
--- a/drivers/rtc/rtc-rv3029c2.c
+++ b/drivers/rtc/rtc-rv3029c2.c
@@ -791,13 +791,6 @@ static struct rtc_class_ops rv3029_rtc_ops = {
.set_time = rv3029_set_time,
};
-static struct i2c_device_id rv3029_id[] = {
- { "rv3029", 0 },
- { "rv3029c2", 0 },
- { }
-};
-MODULE_DEVICE_TABLE(i2c, rv3029_id);
-
static int rv3029_probe(struct device *dev, struct regmap *regmap, int irq,
const char *name)
{
@@ -875,6 +868,13 @@ static int rv3029_i2c_probe(struct i2c_client *client,
return rv3029_probe(&client->dev, regmap, client->irq, client->name);
}
+static struct i2c_device_id rv3029_id[] = {
+ { "rv3029", 0 },
+ { "rv3029c2", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, rv3029_id);
+
static struct i2c_driver rv3029_driver = {
.driver = {
.name = "rtc-rv3029c2",
--
2.7.0
[toc] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2016-05-04 12:10 +0200 |
| Message-ID | <rv1UK-1RQ-7@gated-at.bofh.it> |
| In reply to | #1394125 |
On 04/05/2016 at 11:50:02 +0200, Arnd Bergmann wrote :
> The added support for SPI mode made it possible to configure the driver
> when I2C is disabled, leaving an unused device table:
>
> drivers/rtc/rtc-rv3029c2.c:794:29: error: 'rv3029_id' defined but not used [-Werror=unused-variable]
>
> This moves the table inside of the #ifdef section that has the
> only user, to avoid the harmless warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: d08f50dd0afc ("rtc: rv3029: Add support of RV3049")
> ---
> drivers/rtc/rtc-rv3029c2.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web