Skip to content

Commit

Permalink
rtc: remove useless DRV_VERSION
Browse files Browse the repository at this point in the history
Many drivers are defining a DRV_VERSION. This is often only used for
MODULE_VERSION and sometimes to print an info message at probe time. This
is kind of pointless as they are all versionned with the kernel anyway.
Also the core will print a message when a new rtc is found.

Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
alexandrebelloni committed May 20, 2016
1 parent df2d741 commit fa56911
Show file tree
Hide file tree
Showing 25 changed files with 1 addition and 89 deletions.
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ds1216.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <linux/bcd.h>
#include <linux/slab.h>

#define DRV_VERSION "0.2"

struct ds1216_regs {
u8 tsec;
u8 sec;
Expand Down Expand Up @@ -176,5 +174,4 @@ module_platform_driver_probe(ds1216_rtc_platform_driver, ds1216_rtc_probe);
MODULE_AUTHOR("Thomas Bogendoerfer <[email protected]>");
MODULE_DESCRIPTION("DS1216 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-ds1216");
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ds1286.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <linux/io.h>
#include <linux/slab.h>

#define DRV_VERSION "1.0"

struct ds1286_priv {
struct rtc_device *rtc;
u32 __iomem *rtcregs;
Expand Down Expand Up @@ -363,5 +361,4 @@ module_platform_driver(ds1286_platform_driver);
MODULE_AUTHOR("Thomas Bogendoerfer <[email protected]>");
MODULE_DESCRIPTION("DS1286 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-ds1286");
2 changes: 0 additions & 2 deletions drivers/rtc/rtc-ds1302.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/spi/spi.h>

#define DRV_NAME "rtc-ds1302"
#define DRV_VERSION "1.0.0"

#define RTC_CMD_READ 0x81 /* Read command */
#define RTC_CMD_WRITE 0x80 /* Write command */
Expand Down Expand Up @@ -216,6 +215,5 @@ static struct spi_driver ds1302_driver = {
module_spi_driver(ds1302_driver);

MODULE_DESCRIPTION("Dallas DS1302 RTC driver");
MODULE_VERSION(DRV_VERSION);
MODULE_AUTHOR("Paul Mundt, David McCullough");
MODULE_LICENSE("GPL v2");
2 changes: 0 additions & 2 deletions drivers/rtc/rtc-ds1343.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <linux/pm_wakeirq.h>
#include <linux/slab.h>

#define DS1343_DRV_VERSION "01.00"
#define DALLAS_MAXIM_DS1343 0
#define DALLAS_MAXIM_DS1344 1

Expand Down Expand Up @@ -747,4 +746,3 @@ MODULE_DESCRIPTION("DS1343 RTC SPI Driver");
MODULE_AUTHOR("Raghavendra Chandra Ganiga <[email protected]>,"
"Ankur Srivastava <[email protected]>");
MODULE_LICENSE("GPL v2");
MODULE_VERSION(DS1343_DRV_VERSION);
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ds1511.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include <linux/io.h>
#include <linux/module.h>

#define DRV_VERSION "0.6"

enum ds1511reg {
DS1511_SEC = 0x0,
DS1511_MIN = 0x1,
Expand Down Expand Up @@ -537,4 +535,3 @@ module_platform_driver(ds1511_rtc_driver);
MODULE_AUTHOR("Andrew Sharp <[email protected]>");
MODULE_DESCRIPTION("Dallas DS1511 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ds1553.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <linux/io.h>
#include <linux/module.h>

#define DRV_VERSION "0.3"

#define RTC_REG_SIZE 0x2000
#define RTC_OFFSET 0x1ff0

Expand Down Expand Up @@ -359,4 +357,3 @@ module_platform_driver(ds1553_rtc_driver);
MODULE_AUTHOR("Atsushi Nemoto <[email protected]>");
MODULE_DESCRIPTION("Dallas DS1553 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
5 changes: 0 additions & 5 deletions drivers/rtc/rtc-ds1672.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include <linux/rtc.h>
#include <linux/module.h>

#define DRV_VERSION "0.4"

/* Registers */

#define DS1672_REG_CNT_BASE 0
Expand Down Expand Up @@ -165,8 +163,6 @@ static int ds1672_probe(struct i2c_client *client,
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
return -ENODEV;

dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");

rtc = devm_rtc_device_register(&client->dev, ds1672_driver.driver.name,
&ds1672_rtc_ops, THIS_MODULE);

Expand Down Expand Up @@ -213,4 +209,3 @@ module_i2c_driver(ds1672_driver);
MODULE_AUTHOR("Alessandro Zummo <[email protected]>");
MODULE_DESCRIPTION("Dallas/Maxim DS1672 timekeeper driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ds1685.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include <linux/proc_fs.h>
#endif

#define DRV_VERSION "0.42.0"


/* ----------------------------------------------------------------------- */
/* Standard read/write functions if platform does not provide overrides */
Expand Down Expand Up @@ -2224,5 +2222,4 @@ MODULE_AUTHOR("Joshua Kinard <[email protected]>");
MODULE_AUTHOR("Matthias Fuchs <[email protected]>");
MODULE_DESCRIPTION("Dallas/Maxim DS1685/DS1687-series RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-ds1685");
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ds1742.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include <linux/io.h>
#include <linux/module.h>

#define DRV_VERSION "0.4"

#define RTC_SIZE 8

#define RTC_CONTROL 0
Expand Down Expand Up @@ -239,5 +237,4 @@ module_platform_driver(ds1742_rtc_driver);
MODULE_AUTHOR("Atsushi Nemoto <[email protected]>");
MODULE_DESCRIPTION("Dallas DS1742 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-ds1742");
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-ep93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#define EP93XX_RTC_SWCOMP_INT_MASK 0x0000ffff
#define EP93XX_RTC_SWCOMP_INT_SHIFT 0

#define DRV_VERSION "0.3"

/*
* struct device dev.platform_data is used to store our private data
* because struct rtc_device does not have a variable to hold it.
Expand Down Expand Up @@ -184,5 +182,4 @@ module_platform_driver(ep93xx_rtc_driver);
MODULE_AUTHOR("Alessandro Zummo <[email protected]>");
MODULE_DESCRIPTION("EP93XX RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:ep93xx-rtc");
1 change: 0 additions & 1 deletion drivers/rtc/rtc-gemini.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <linux/module.h>

#define DRV_NAME "rtc-gemini"
#define DRV_VERSION "0.2"

MODULE_AUTHOR("Hans Ulli Kroll <[email protected]>");
MODULE_DESCRIPTION("RTC driver for Gemini SoC");
Expand Down
5 changes: 0 additions & 5 deletions drivers/rtc/rtc-isl12022.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <linux/of.h>
#include <linux/of_device.h>

#define DRV_VERSION "0.1"

/* ISL register offsets */
#define ISL12022_REG_SC 0x00
#define ISL12022_REG_MN 0x01
Expand Down Expand Up @@ -258,8 +256,6 @@ static int isl12022_probe(struct i2c_client *client,
if (!isl12022)
return -ENOMEM;

dev_dbg(&client->dev, "chip found, driver version " DRV_VERSION "\n");

i2c_set_clientdata(client, isl12022);

isl12022->rtc = devm_rtc_device_register(&client->dev,
Expand Down Expand Up @@ -299,4 +295,3 @@ module_i2c_driver(isl12022_driver);
MODULE_AUTHOR("[email protected]");
MODULE_DESCRIPTION("ISL 12022 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
6 changes: 0 additions & 6 deletions drivers/rtc/rtc-isl1208.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include <linux/bcd.h>
#include <linux/rtc.h>

#define DRV_VERSION "0.3"

/* Register map */
/* rtc section */
#define ISL1208_REG_SC 0x00
Expand Down Expand Up @@ -632,9 +630,6 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
if (isl1208_i2c_validate_client(client) < 0)
return -ENODEV;

dev_info(&client->dev,
"chip found, driver version " DRV_VERSION "\n");

if (client->irq > 0) {
rc = devm_request_threaded_irq(&client->dev, client->irq, NULL,
isl1208_rtc_interrupt,
Expand Down Expand Up @@ -706,4 +701,3 @@ module_i2c_driver(isl1208_driver);
MODULE_AUTHOR("Herbert Valerio Riedel <[email protected]>");
MODULE_DESCRIPTION("Intersil ISL1208 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
3 changes: 0 additions & 3 deletions drivers/rtc/rtc-m48t35.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include <linux/io.h>
#include <linux/err.h>

#define DRV_VERSION "1.0"

struct m48t35_rtc {
u8 pad[0x7ff8]; /* starts at 0x7ff8 */
u8 control;
Expand Down Expand Up @@ -190,5 +188,4 @@ module_platform_driver(m48t35_platform_driver);
MODULE_AUTHOR("Thomas Bogendoerfer <[email protected]>");
MODULE_DESCRIPTION("M48T35 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-m48t35");
4 changes: 0 additions & 4 deletions drivers/rtc/rtc-m48t86.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
#define M48T86_REG_B_SET (1 << 7)
#define M48T86_REG_D_VRT (1 << 7)

#define DRV_VERSION "0.1"


static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
unsigned char reg;
Expand Down Expand Up @@ -178,5 +175,4 @@ module_platform_driver(m48t86_rtc_platform_driver);
MODULE_AUTHOR("Alessandro Zummo <[email protected]>");
MODULE_DESCRIPTION("M48T86 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("platform:rtc-m48t86");
5 changes: 0 additions & 5 deletions drivers/rtc/rtc-max6900.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <linux/rtc.h>
#include <linux/delay.h>

#define DRV_VERSION "0.2"

/*
* register indices
*/
Expand Down Expand Up @@ -218,8 +216,6 @@ max6900_probe(struct i2c_client *client, const struct i2c_device_id *id)
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
return -ENODEV;

dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");

rtc = devm_rtc_device_register(&client->dev, max6900_driver.driver.name,
&max6900_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc))
Expand Down Expand Up @@ -249,4 +245,3 @@ module_i2c_driver(max6900_driver);
MODULE_DESCRIPTION("Maxim MAX6900 RTC driver");
MODULE_AUTHOR("Dale Farnsworth <[email protected]>");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
4 changes: 0 additions & 4 deletions drivers/rtc/rtc-pcf2123.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
#include <linux/module.h>
#include <linux/sysfs.h>

#define DRV_VERSION "0.6"

/* REGISTERS */
#define PCF2123_REG_CTRL1 (0x00) /* Control Register 1 */
#define PCF2123_REG_CTRL2 (0x01) /* Control Register 2 */
Expand Down Expand Up @@ -395,7 +393,6 @@ static int pcf2123_probe(struct spi_device *spi)
}
}

dev_info(&spi->dev, "chip found, driver version " DRV_VERSION "\n");
dev_info(&spi->dev, "spiclk %u KHz.\n",
(spi->max_speed_hz + 500) / 1000);

Expand Down Expand Up @@ -474,4 +471,3 @@ module_spi_driver(pcf2123_driver);
MODULE_AUTHOR("Chris Verges <[email protected]>");
MODULE_DESCRIPTION("NXP PCF2123 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
5 changes: 0 additions & 5 deletions drivers/rtc/rtc-pcf8563.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <linux/of.h>
#include <linux/err.h>

#define DRV_VERSION "0.4.4"

#define PCF8563_REG_ST1 0x00 /* status */
#define PCF8563_REG_ST2 0x01
#define PCF8563_BIT_AIE (1 << 1)
Expand Down Expand Up @@ -580,8 +578,6 @@ static int pcf8563_probe(struct i2c_client *client,
if (!pcf8563)
return -ENOMEM;

dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");

i2c_set_clientdata(client, pcf8563);
pcf8563->client = client;
device_set_wakeup_capable(&client->dev, 1);
Expand Down Expand Up @@ -662,4 +658,3 @@ module_i2c_driver(pcf8563_driver);
MODULE_AUTHOR("Alessandro Zummo <[email protected]>");
MODULE_DESCRIPTION("Philips PCF8563/Epson RTC8564 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
2 changes: 0 additions & 2 deletions drivers/rtc/rtc-rs5c313.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <linux/io.h>

#define DRV_NAME "rs5c313"
#define DRV_VERSION "1.13"

#ifdef CONFIG_SH_LANDISK
/*****************************************************/
Expand Down Expand Up @@ -407,7 +406,6 @@ static void __exit rs5c313_rtc_exit(void)
module_init(rs5c313_rtc_init);
module_exit(rs5c313_rtc_exit);

MODULE_VERSION(DRV_VERSION);
MODULE_AUTHOR("kogiidena , Nobuhiro Iwamatsu <[email protected]>");
MODULE_DESCRIPTION("Ricoh RS5C313 RTC device driver");
MODULE_LICENSE("GPL");
Expand Down
4 changes: 0 additions & 4 deletions drivers/rtc/rtc-rs5c348.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include <linux/spi/spi.h>
#include <linux/module.h>

#define DRV_VERSION "0.2"

#define RS5C348_REG_SECS 0
#define RS5C348_REG_MINS 1
#define RS5C348_REG_HOURS 2
Expand Down Expand Up @@ -171,7 +169,6 @@ static int rs5c348_probe(struct spi_device *spi)
goto kfree_exit;
}

dev_info(&spi->dev, "chip found, driver version " DRV_VERSION "\n");
dev_info(&spi->dev, "spiclk %u KHz.\n",
(spi->max_speed_hz + 500) / 1000);

Expand Down Expand Up @@ -230,5 +227,4 @@ module_spi_driver(rs5c348_driver);
MODULE_AUTHOR("Atsushi Nemoto <[email protected]>");
MODULE_DESCRIPTION("Ricoh RS5C348 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_ALIAS("spi:rtc-rs5c348");
6 changes: 1 addition & 5 deletions drivers/rtc/rtc-rs5c372.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#include <linux/slab.h>
#include <linux/module.h>

#define DRV_VERSION "0.6"


/*
* Ricoh has a family of I2C based RTCs, which differ only slightly from
* each other. Differences center on pinout (e.g. how many interrupts,
Expand Down Expand Up @@ -640,7 +637,7 @@ static int rs5c372_probe(struct i2c_client *client,
if (rs5c372_get_datetime(client, &tm) < 0)
dev_warn(&client->dev, "clock needs to be set\n");

dev_info(&client->dev, "%s found, %s, driver version " DRV_VERSION "\n",
dev_info(&client->dev, "%s found, %s\n",
({ char *s; switch (rs5c372->type) {
case rtc_r2025sd: s = "r2025sd"; break;
case rtc_r2221tl: s = "r2221tl"; break;
Expand Down Expand Up @@ -696,4 +693,3 @@ MODULE_AUTHOR(
"Paul Mundt <[email protected]>");
MODULE_DESCRIPTION("Ricoh RS5C372 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
5 changes: 0 additions & 5 deletions drivers/rtc/rtc-rx8581.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include <linux/rtc.h>
#include <linux/log2.h>

#define DRV_VERSION "0.1"

#define RX8581_REG_SC 0x00 /* Second in BCD */
#define RX8581_REG_MN 0x01 /* Minute in BCD */
#define RX8581_REG_HR 0x02 /* Hour in BCD */
Expand Down Expand Up @@ -292,8 +290,6 @@ static int rx8581_probe(struct i2c_client *client,
rx8581->write_block_data = rx8581_write_block_data;
}

dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");

rx8581->rtc = devm_rtc_device_register(&client->dev,
rx8581_driver.driver.name, &rx8581_rtc_ops, THIS_MODULE);

Expand Down Expand Up @@ -325,4 +321,3 @@ module_i2c_driver(rx8581_driver);
MODULE_AUTHOR("Martyn Welch <[email protected]>");
MODULE_DESCRIPTION("Epson RX-8581 RTC driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
Loading

0 comments on commit fa56911

Please sign in to comment.