mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] rtc: pcf85063: remove useless DRV_VERSION
@ 2016-03-02 10:25 Alexandre Belloni
  2016-03-02 10:25 ` [PATCH 2/2] rtc: pcf85063: remove struct pcf85063 Alexandre Belloni
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Belloni @ 2016-03-02 10:25 UTC (permalink / raw)
  To: rtc-linux
  Cc: Alessandro Zummo, Juergen Borleis, linux-kernel, Alexandre Belloni

Since the driver is mainlined there is no use for a separate version
number.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/rtc/rtc-pcf85063.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
index 4e940cc3d782..550f67518c5a 100644
--- a/drivers/rtc/rtc-pcf85063.c
+++ b/drivers/rtc/rtc-pcf85063.c
@@ -16,8 +16,6 @@
 #include <linux/rtc.h>
 #include <linux/module.h>
 
-#define DRV_VERSION "0.0.1"
-
 #define PCF85063_REG_CTRL1		0x00 /* status */
 #define PCF85063_REG_CTRL1_STOP		BIT(5)
 #define PCF85063_REG_CTRL2		0x01
@@ -182,8 +180,6 @@ static int pcf85063_probe(struct i2c_client *client,
 	if (!pcf85063)
 		return -ENOMEM;
 
-	dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");
-
 	i2c_set_clientdata(client, pcf85063);
 
 	pcf85063->rtc = devm_rtc_device_register(&client->dev,
@@ -221,4 +217,3 @@ module_i2c_driver(pcf85063_driver);
 MODULE_AUTHOR("Søren Andersen <san@rosetechnology.dk>");
 MODULE_DESCRIPTION("PCF85063 RTC driver");
 MODULE_LICENSE("GPL");
-MODULE_VERSION(DRV_VERSION);
-- 
2.7.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] rtc: pcf85063: remove struct pcf85063
  2016-03-02 10:25 [PATCH 1/2] rtc: pcf85063: remove useless DRV_VERSION Alexandre Belloni
@ 2016-03-02 10:25 ` Alexandre Belloni
  2016-03-03 15:14   ` Juergen Borleis
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Belloni @ 2016-03-02 10:25 UTC (permalink / raw)
  To: rtc-linux
  Cc: Alessandro Zummo, Juergen Borleis, linux-kernel, Alexandre Belloni

No members of struct pcf85063 are used anymore, remove the whole structure.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/rtc/rtc-pcf85063.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
index 550f67518c5a..e8ddbb359d11 100644
--- a/drivers/rtc/rtc-pcf85063.c
+++ b/drivers/rtc/rtc-pcf85063.c
@@ -31,11 +31,6 @@
 
 static struct i2c_driver pcf85063_driver;
 
-struct pcf85063 {
-	struct rtc_device *rtc;
-	int voltage_low; /* indicates if a low_voltage was detected */
-};
-
 static int pcf85063_stop_clock(struct i2c_client *client, u8 *ctrl1)
 {
 	s32 ret;
@@ -168,25 +163,18 @@ static const struct rtc_class_ops pcf85063_rtc_ops = {
 static int pcf85063_probe(struct i2c_client *client,
 				const struct i2c_device_id *id)
 {
-	struct pcf85063 *pcf85063;
+	struct rtc_device *rtc;
 
 	dev_dbg(&client->dev, "%s\n", __func__);
 
 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
 		return -ENODEV;
 
-	pcf85063 = devm_kzalloc(&client->dev, sizeof(struct pcf85063),
-				GFP_KERNEL);
-	if (!pcf85063)
-		return -ENOMEM;
-
-	i2c_set_clientdata(client, pcf85063);
-
-	pcf85063->rtc = devm_rtc_device_register(&client->dev,
-				pcf85063_driver.driver.name,
-				&pcf85063_rtc_ops, THIS_MODULE);
+	rtc = devm_rtc_device_register(&client->dev,
+				       pcf85063_driver.driver.name,
+				       &pcf85063_rtc_ops, THIS_MODULE);
 
-	return PTR_ERR_OR_ZERO(pcf85063->rtc);
+	return PTR_ERR_OR_ZERO(rtc);
 }
 
 static const struct i2c_device_id pcf85063_id[] = {
-- 
2.7.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] rtc: pcf85063: remove struct pcf85063
  2016-03-02 10:25 ` [PATCH 2/2] rtc: pcf85063: remove struct pcf85063 Alexandre Belloni
@ 2016-03-03 15:14   ` Juergen Borleis
  0 siblings, 0 replies; 3+ messages in thread
From: Juergen Borleis @ 2016-03-03 15:14 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: rtc-linux, Alessandro Zummo, linux-kernel

On Wednesday 02 March 2016 11:25:43 Alexandre Belloni wrote:
> No members of struct pcf85063 are used anymore, remove the whole structure.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  drivers/rtc/rtc-pcf85063.c | 22 +++++-----------------
>  1 file changed, 5 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
> index 550f67518c5a..e8ddbb359d11 100644
> --- a/drivers/rtc/rtc-pcf85063.c
> +++ b/drivers/rtc/rtc-pcf85063.c
> @@ -31,11 +31,6 @@
>
>  static struct i2c_driver pcf85063_driver;
>
> -struct pcf85063 {
> -	struct rtc_device *rtc;
> -	int voltage_low; /* indicates if a low_voltage was detected */
> -};
> -
>  static int pcf85063_stop_clock(struct i2c_client *client, u8 *ctrl1)
>  {
>  	s32 ret;
> @@ -168,25 +163,18 @@ static const struct rtc_class_ops pcf85063_rtc_ops = {
>  static int pcf85063_probe(struct i2c_client *client, 
>  				const struct i2c_device_id *id)
>  {
> -	struct pcf85063 *pcf85063;
> +	struct rtc_device *rtc;
>
>  	dev_dbg(&client->dev, "%s\n", __func__);
>
>  	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
>  		return -ENODEV;
>
> -	pcf85063 = devm_kzalloc(&client->dev, sizeof(struct pcf85063),
> -				GFP_KERNEL);
> -	if (!pcf85063)
> -		return -ENOMEM;
> -
> -	i2c_set_clientdata(client, pcf85063);
> -
> -	pcf85063->rtc = devm_rtc_device_register(&client->dev,
> -				pcf85063_driver.driver.name,
> -				&pcf85063_rtc_ops, THIS_MODULE);
> +	rtc = devm_rtc_device_register(&client->dev,
> +				       pcf85063_driver.driver.name,
> +				       &pcf85063_rtc_ops, THIS_MODULE);
>
> -	return PTR_ERR_OR_ZERO(pcf85063->rtc);
> +	return PTR_ERR_OR_ZERO(rtc);
>  }
>
>  static const struct i2c_device_id pcf85063_id[] = {

Reviewed-by: Juergen Borleis <jbe@pengutronix.de>

jb

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-03 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-02 10:25 [PATCH 1/2] rtc: pcf85063: remove useless DRV_VERSION Alexandre Belloni
2016-03-02 10:25 ` [PATCH 2/2] rtc: pcf85063: remove struct pcf85063 Alexandre Belloni
2016-03-03 15:14   ` Juergen Borleis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®