linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [PATCH 59/59] rtc: remove devm_rtc_device_register()
Date: Thu, 19 Nov 2020 12:41:49 +0100	[thread overview]
Message-ID: <20201119114149.4117-60-brgl@bgdev.pl> (raw)
In-Reply-To: <20201119114149.4117-1-brgl@bgdev.pl>

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

All users have been converted to using the devm_rtc_allocate_device() +
devm_rtc_register_device() pair. We can remove the deprecated interface.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 .../driver-api/driver-model/devres.rst        |  1 -
 drivers/rtc/class.c                           | 36 -------------------
 include/linux/rtc.h                           |  4 ---
 3 files changed, 41 deletions(-)

diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
index cd8b6e657b94..f22823af7265 100644
--- a/Documentation/driver-api/driver-model/devres.rst
+++ b/Documentation/driver-api/driver-model/devres.rst
@@ -412,7 +412,6 @@ RESET
   devm_reset_controller_register()
 
 RTC
-  devm_rtc_device_register()
   devm_rtc_allocate_device()
   devm_rtc_register_device()
   devm_rtc_nvmem_register()
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index e6b44b7c4ad3..e192ea39ff3f 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -415,42 +415,6 @@ int __devm_rtc_register_device(struct module *owner, struct rtc_device *rtc)
 }
 EXPORT_SYMBOL_GPL(__devm_rtc_register_device);
 
-/**
- * devm_rtc_device_register - resource managed rtc_device_register()
- * @dev: the device to register
- * @name: the name of the device (unused)
- * @ops: the rtc operations structure
- * @owner: the module owner
- *
- * @return a struct rtc on success, or an ERR_PTR on error
- *
- * Managed rtc_device_register(). The rtc_device returned from this function
- * are automatically freed on driver detach.
- * This function is deprecated, use devm_rtc_allocate_device and
- * rtc_register_device instead
- */
-struct rtc_device *devm_rtc_device_register(struct device *dev,
-					    const char *name,
-					    const struct rtc_class_ops *ops,
-					    struct module *owner)
-{
-	struct rtc_device *rtc;
-	int err;
-
-	rtc = devm_rtc_allocate_device(dev);
-	if (IS_ERR(rtc))
-		return rtc;
-
-	rtc->ops = ops;
-
-	err = __devm_rtc_register_device(owner, rtc);
-	if (err)
-		return ERR_PTR(err);
-
-	return rtc;
-}
-EXPORT_SYMBOL_GPL(devm_rtc_device_register);
-
 static int __init rtc_init(void)
 {
 	rtc_class = class_create(THIS_MODULE, "rtc");
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 55e7beed066c..e3623446a9d7 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -150,10 +150,6 @@ struct rtc_device {
 #define RTC_TIMESTAMP_END_2199		7258118399LL /* 2199-12-31 23:59:59 */
 #define RTC_TIMESTAMP_END_9999		253402300799LL /* 9999-12-31 23:59:59 */
 
-extern struct rtc_device *devm_rtc_device_register(struct device *dev,
-					const char *name,
-					const struct rtc_class_ops *ops,
-					struct module *owner);
 struct rtc_device *devm_rtc_allocate_device(struct device *dev);
 int __devm_rtc_register_device(struct module *owner, struct rtc_device *rtc);
 
-- 
2.29.1


  parent reply	other threads:[~2020-11-19 11:43 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 11:40 [PATCH 00/59] rtc: remove all uses of devm_rtc_device_register() Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 01/59] rtc: da9055: stop using deprecated RTC API Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 02/59] rtc: m41t94: " Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 03/59] rtc: ds1390: " Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 04/59] rtc: ds3232: " Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 05/59] rtc: rx6110: " Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 06/59] rtc: palmas: " Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 07/59] rtc: bq32k: " Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 08/59] rtc: m48t35: " Bartosz Golaszewski
2020-11-19 11:40 ` [PATCH 09/59] rtc: pcf50633: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 10/59] rtc: pcf8583: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 11/59] rtc: efi: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 12/59] rtc: pcf8523: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 13/59] rtc: stm32: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 14/59] rtc: max8925: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 15/59] rtc: max8907: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 16/59] rtc: pxa: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 17/59] rtc: hym8563: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 18/59] rtc: max6916: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 19/59] rtc: max8998: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 20/59] rtc: s5m: use devm_i2c_new_dummy_device() Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 21/59] rtc: s5m: stop using deprecated RTC API Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 22/59] rtc: moxart: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 23/59] rtc: hid: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 24/59] rtc: generic: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 25/59] rtc: lpc24xx: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 26/59] rtc: spear: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 27/59] rtc: max77686: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 28/59] rtc: ds1286: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 29/59] rtc: twl: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 30/59] rtc: s3c: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 31/59] rtc: mcp795: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 32/59] rtc: x1205: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 33/59] rtc: max6902: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 34/59] rtc: max6900: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 35/59] rtc: rx8025: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 36/59] rtc: asm9260: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 37/59] rtc: opal: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 38/59] rtc: rc5t583: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 39/59] rtc: wm8350: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 40/59] rtc: r7301: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 41/59] rtc: max8997: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 42/59] rtc: isl12022: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 43/59] rtc: tps80031: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 44/59] rtc: rs5c372: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 45/59] rtc: mt7622: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 46/59] rtc: ds1302: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 47/59] rtc: bq4802: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 48/59] rtc: rs5c313: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 49/59] rtc: em3027: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 50/59] rtc: v3020: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 51/59] rtc: ds1216: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 52/59] rtc: rx4581: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 53/59] rtc: m41t93: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 54/59] rtc: fm3130: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 55/59] rtc: rtd119x: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 56/59] rtc: msm6242: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 57/59] rtc: as3722: " Bartosz Golaszewski
2020-11-19 11:41 ` [PATCH 58/59] rtc: lp8788: " Bartosz Golaszewski
2020-11-19 11:41 ` Bartosz Golaszewski [this message]
2020-11-19 11:48 ` [PATCH 00/59] rtc: remove all uses of devm_rtc_device_register() Alexandre Belloni
2020-11-19 12:15   ` Bartosz Golaszewski

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=20201119114149.4117-60-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    /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).