rtc: nvmem: remove nvram ABI
Alexandre Belloni
maintainerPATCH 1/1 rtc: nvmem: remove nvram ABI
The nvram sysfs attributes have been deprecated at least since v4.13, more than 3 years ago and nobody ever complained about the deprecation warning.
Remove the sysfs attributes now.
Signed-off-by Alexandre Belloni <[email protected]>
--- drivers/rtc/class.c | 2 - drivers/rtc/nvmem.c | 82 +------------------------------------- drivers/rtc/rtc-cmos.c | 1 - drivers/rtc/rtc-ds1305.c | 1 - drivers/rtc/rtc-ds1307.c | 1 - drivers/rtc/rtc-ds1343.c | 1 - drivers/rtc/rtc-ds1511.c | 2 - drivers/rtc/rtc-ds1553.c | 1 - drivers/rtc/rtc-ds1685.c | 1 - drivers/rtc/rtc-ds1742.c | 1 - drivers/rtc/rtc-m48t59.c | 1 - drivers/rtc/rtc-m48t86.c | 1 - drivers/rtc/rtc-rp5c01.c | 1 - drivers/rtc/rtc-rv8803.c | 1 - drivers/rtc/rtc-stk17ta8.c | 1 - drivers/rtc/rtc-tx4939.c | 1 - include/linux/rtc.h | 4 -- 17 files changed, 1 insertion(+), 102 deletions(-)
drivers/rtc/class.c +0 -2
@@ -339,8 +339,6 @@ static void devm_rtc_release_device(struct device *dev, void *res) {struct rtc_device *rtc = *(struct rtc_device **)res; -rtc_nvmem_unregister (rtc); -if (rtc->registered)rtc_device_unregister (rtc);else
drivers/rtc/nvmem.c +1 -81
95 lines not on this page · raw message
drivers/rtc/rtc-cmos.c +0 -1
@@ -863,7 +863,6 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) cmos_rtc.rtc->ops = &cmos_rtc_ops_no_alarm; } - cmos_rtc.rtc->nvram_old_abi = true; retval =rtc_register_device (cmos_rtc.rtc);if (retval) goto cleanup2;
drivers/rtc/rtc-ds1305.c +0 -1
@@ -694,7 +694,6 @@ static int ds1305_probe(struct spi_device *spi) ds1305->rtc->range_max =RTC_TIMESTAMP_END_2099 ; ds1305_nvmem_cfg.priv = ds1305; - ds1305->rtc->nvram_old_abi = true; status =rtc_register_device (ds1305->rtc);if (status)return status;
drivers/rtc/rtc-ds1307.c +0 -1
@@ -2047,7 +2047,6 @@ static int ds1307_probe(struct i2c_client *client, .priv = ds1307, }; - ds1307->rtc->nvram_old_abi = true;rtc_nvmem_register (ds1307->rtc, &nvmem_cfg); }
drivers/rtc/rtc-ds1343.c +0 -1
@@ -399,7 +399,6 @@ static int ds1343_probe(struct spi_device *spi)if (IS_ERR (priv->rtc))return PTR_ERR (priv->rtc); - priv->rtc->nvram_old_abi = true; priv->rtc->ops = &ds1343_rtc_ops; priv->rtc->range_min =RTC_TIMESTAMP_BEGIN_2000 ; priv->rtc->range_max =RTC_TIMESTAMP_END_2099 ;
drivers/rtc/rtc-ds1511.c +0 -2
@@ -466,8 +466,6 @@ static int ds1511_rtc_probe(struct platform_device *pdev) pdata->rtc->ops = &ds1511_rtc_ops; - pdata->rtc->nvram_old_abi = true; - ret =rtc_register_device (pdata->rtc);if (ret)return ret;
drivers/rtc/rtc-ds1553.c +0 -1
@@ -294,7 +294,6 @@ static int ds1553_rtc_probe(struct platform_device *pdev)return PTR_ERR (pdata->rtc); pdata->rtc->ops = &ds1553_rtc_ops; - pdata->rtc->nvram_old_abi = true; ret =rtc_register_device (pdata->rtc);if (ret)
drivers/rtc/rtc-ds1685.c +0 -1
@@ -1316,7 +1316,6 @@ ds1685_rtc_probe(struct platform_device *pdev)if (ret)return ret; - rtc_dev->nvram_old_abi = true; nvmem_cfg.priv = rtc; ret =rtc_nvmem_register (rtc_dev, &nvmem_cfg);if (ret)
drivers/rtc/rtc-ds1742.c +0 -1
@@ -190,7 +190,6 @@ static int ds1742_rtc_probe(struct platform_device *pdev)return PTR_ERR (rtc); rtc->ops = &ds1742_rtc_ops; - rtc->nvram_old_abi = true; ret =rtc_register_device (rtc);if (ret)
drivers/rtc/rtc-m48t59.c +0 -1
@@ -463,7 +463,6 @@ static int m48t59_rtc_probe(struct platform_device *pdev)if (IS_ERR (m48t59->rtc))return PTR_ERR (m48t59->rtc); - m48t59->rtc->nvram_old_abi = true; m48t59->rtc->ops = ops; nvmem_cfg.size = pdata->offset;
drivers/rtc/rtc-m48t86.c +0 -1
@@ -254,7 +254,6 @@ static int m48t86_rtc_probe(struct platform_device *pdev)return PTR_ERR (info->rtc); info->rtc->ops = &m48t86_rtc_ops; - info->rtc->nvram_old_abi = true; err =rtc_register_device (info->rtc);if (err)
drivers/rtc/rtc-rp5c01.c +0 -1
@@ -251,7 +251,6 @@ static int __init rp5c01_rtc_probe(struct platform_device *dev)return PTR_ERR (rtc); rtc->ops = &rp5c01_rtc_ops; - rtc->nvram_old_abi = true; priv->rtc = rtc;
drivers/rtc/rtc-rv8803.c +0 -1
@@ -585,7 +585,6 @@ static int rv8803_probe(struct i2c_client *client, } rv8803->rtc->ops = &rv8803_rtc_ops; - rv8803->rtc->nvram_old_abi = true; rv8803->rtc->range_min =RTC_TIMESTAMP_BEGIN_2000 ; rv8803->rtc->range_max =RTC_TIMESTAMP_END_2099 ; err =rtc_register_device (rv8803->rtc);
drivers/rtc/rtc-stk17ta8.c +0 -1
@@ -311,7 +311,6 @@ static int stk17ta8_rtc_probe(struct platform_device *pdev)return PTR_ERR (pdata->rtc); pdata->rtc->ops = &stk17ta8_rtc_ops; - pdata->rtc->nvram_old_abi = true; nvmem_cfg.priv = pdata; ret =rtc_nvmem_register (pdata->rtc, &nvmem_cfg);
drivers/rtc/rtc-tx4939.c +0 -1
@@ -266,7 +266,6 @@ static int __init tx4939_rtc_probe(struct platform_device *pdev)return PTR_ERR (rtc); rtc->ops = &tx4939_rtc_ops; - rtc->nvram_old_abi = true; rtc->range_max =U32_MAX ; pdata->rtc = rtc;
include/linux/rtc.h +0 -4
@@ -120,10 +120,6 @@ struct rtc_device {bool registered; -/* Old ABI support */ -bool nvram_old_abi; -struct bin_attribute *nvram; -time64_t range_min;timeu64_t range_max;time64_t start_secs;
Signature · 1 line
2.28.0
Quoted 8 lines · Alexandre Belloni
The nvram sysfs attributes have been deprecated at least since v4.13, more than 3 years ago and nobody ever complained about the deprecation warning.
Remove the sysfs attributes now.
Signed-off-by Alexandre Belloni <[email protected]>---
One thing that I see missing from the patch is the declaration for rtc_nvmem_unregister() is still in include/linux/rtc.h. But don't worry about that - I will take that patch and base my devres proposition on it and I'll fix this in my series.
Should send something shortly.
Bartosz