]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hwmon: Switch back to struct platform_driver::remove()
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Thu, 17 Oct 2024 15:59:01 +0000 (17:59 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 10 Nov 2024 22:48:07 +0000 (14:48 -0800)
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/hwmonto use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

While touching these files, make indention of the struct initializer
consistent in several files.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Message-ID: <20241017155900.137357-2-u.kleine-koenig@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
25 files changed:
drivers/hwmon/abituguru.c
drivers/hwmon/abituguru3.c
drivers/hwmon/aspeed-g6-pwm-tach.c
drivers/hwmon/da9052-hwmon.c
drivers/hwmon/dme1737.c
drivers/hwmon/f71805f.c
drivers/hwmon/f71882fg.c
drivers/hwmon/i5k_amb.c
drivers/hwmon/max197.c
drivers/hwmon/mc13783-adc.c
drivers/hwmon/occ/p9_sbe.c
drivers/hwmon/pc87360.c
drivers/hwmon/pc87427.c
drivers/hwmon/sch5636.c
drivers/hwmon/sht15.c
drivers/hwmon/sis5595.c
drivers/hwmon/smsc47m1.c
drivers/hwmon/ultra45_env.c
drivers/hwmon/via-cputemp.c
drivers/hwmon/via686a.c
drivers/hwmon/vt1211.c
drivers/hwmon/vt8231.c
drivers/hwmon/w83627hf.c
drivers/hwmon/w83781d.c
drivers/hwmon/xgene-hwmon.c

index 93653ea054308f7bf272e7ef6e3a7dccb2de6eca..ba8c68ae45953bf773f804279b04771dcd628362 100644 (file)
@@ -1531,7 +1531,7 @@ static struct platform_driver abituguru_driver = {
                .pm     = pm_sleep_ptr(&abituguru_pm),
        },
        .probe          = abituguru_probe,
-       .remove_new     = abituguru_remove,
+       .remove         = abituguru_remove,
 };
 
 static int __init abituguru_detect(void)
index 4501f0e49efb17b375c0f243af3ee9b4a4d9ba36..b70330dc219844a4c434b66c1d6b9d425ca11747 100644 (file)
@@ -1147,12 +1147,12 @@ static int abituguru3_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(abituguru3_pm, abituguru3_suspend, abituguru3_resume);
 
 static struct platform_driver abituguru3_driver = {
-       .driver = {
+       .driver = {
                .name   = ABIT_UGURU3_NAME,
                .pm     = pm_sleep_ptr(&abituguru3_pm),
        },
        .probe  = abituguru3_probe,
-       .remove_new = abituguru3_remove,
+       .remove = abituguru3_remove,
 };
 
 static int __init abituguru3_dmi_detect(void)
index 75eadda738ab671eb38af1b2feac0ee8abd830b3..4174b129d1fce00fb686fd131f9b51fd0cce34bf 100644 (file)
@@ -534,7 +534,7 @@ MODULE_DEVICE_TABLE(of, aspeed_pwm_tach_match);
 
 static struct platform_driver aspeed_pwm_tach_driver = {
        .probe = aspeed_pwm_tach_probe,
-       .remove_new = aspeed_pwm_tach_remove,
+       .remove = aspeed_pwm_tach_remove,
        .driver = {
                .name = "aspeed-g6-pwm-tach",
                .of_match_table = aspeed_pwm_tach_match,
index 7fb0c57dfef5049b61707459120a9b067b1ddb90..588e96790850af3969dffc5a24511ea97317bdcc 100644 (file)
@@ -473,7 +473,7 @@ static void da9052_hwmon_remove(struct platform_device *pdev)
 
 static struct platform_driver da9052_hwmon_driver = {
        .probe = da9052_hwmon_probe,
-       .remove_new = da9052_hwmon_remove,
+       .remove = da9052_hwmon_remove,
        .driver = {
                .name = "da9052-hwmon",
        },
index 1a9b28dc91e64e9805e023aacddc814e94d3b717..3d4057309950dc109e6c9fd673f512098e9fb143 100644 (file)
@@ -2721,7 +2721,7 @@ static struct platform_driver dme1737_isa_driver = {
                .name = "dme1737",
        },
        .probe = dme1737_isa_probe,
-       .remove_new = dme1737_isa_remove,
+       .remove = dme1737_isa_remove,
 };
 
 /* ---------------------------------------------------------------------
index 243c570dee4c1a50e2c4663665ab52e6b1c63be8..820f894d9ffda93a45a9e0b08a59282726a6a27e 100644 (file)
@@ -1497,7 +1497,7 @@ static struct platform_driver f71805f_driver = {
                .name   = DRVNAME,
        },
        .probe          = f71805f_probe,
-       .remove_new     = f71805f_remove,
+       .remove         = f71805f_remove,
 };
 
 static int __init f71805f_device_add(unsigned short address,
index 7c941d320a186e76eb700c17b086a40836f6ef6b..df83f9866fbcf7d5899d3b96ad826fc20d457cc2 100644 (file)
@@ -2658,7 +2658,7 @@ static struct platform_driver f71882fg_driver = {
                .name   = DRVNAME,
        },
        .probe          = f71882fg_probe,
-       .remove_new     = f71882fg_remove,
+       .remove         = f71882fg_remove,
 };
 
 static int __init f71882fg_init(void)
index 02f5d35dd3199091c90208266e7cfb422be718f0..b22e0423e324932bfc84c6a3c66b64791cb6cb99 100644 (file)
@@ -568,7 +568,7 @@ static struct platform_driver i5k_amb_driver = {
                .name = DRVNAME,
        },
        .probe = i5k_amb_probe,
-       .remove_new = i5k_amb_remove,
+       .remove = i5k_amb_remove,
 };
 
 static int __init i5k_amb_init(void)
index bb30403f81caa0f97e5f74665b2866e55daac389..f0048ff376072277d35ed04e702dfdcd9020f73c 100644 (file)
@@ -332,7 +332,7 @@ static struct platform_driver max197_driver = {
                .name = "max197",
        },
        .probe = max197_probe,
-       .remove_new = max197_remove,
+       .remove = max197_remove,
        .id_table = max197_device_ids,
 };
 module_platform_driver(max197_driver);
index 67471c9cd4d47d0b0e3d1742f3d4915de6e9afaf..66304d48d33a4f65eac1f3ccf41b66702d1f8c30 100644 (file)
@@ -315,7 +315,7 @@ static const struct platform_device_id mc13783_adc_idtable[] = {
 MODULE_DEVICE_TABLE(platform, mc13783_adc_idtable);
 
 static struct platform_driver mc13783_adc_driver = {
-       .remove_new     = mc13783_adc_remove,
+       .remove         = mc13783_adc_remove,
        .driver         = {
                .name   = DRIVER_NAME,
        },
index b5993c79c09ea61236bbeccc3b93da6bb485f864..89761a9c8892fe4ac20da6207e32e3b4c9c6a712 100644 (file)
@@ -192,8 +192,8 @@ static struct platform_driver p9_sbe_occ_driver = {
                .name = "occ-hwmon",
                .of_match_table = p9_sbe_occ_of_match,
        },
-       .probe  = p9_sbe_occ_probe,
-       .remove_new = p9_sbe_occ_remove,
+       .probe = p9_sbe_occ_probe,
+       .remove = p9_sbe_occ_remove,
 };
 
 module_platform_driver(p9_sbe_occ_driver);
index 788b5d58f77eaf8d4a8d3c377170f6d569ceb935..0f8aa6b42164f4b7357a3f79fae945ec0fc023a0 100644 (file)
@@ -1606,7 +1606,7 @@ static struct platform_driver pc87360_driver = {
                .name   = DRIVER_NAME,
        },
        .probe          = pc87360_probe,
-       .remove_new     = pc87360_remove,
+       .remove         = pc87360_remove,
 };
 
 /*
index 7bca04eb4ee4f59ec2a1857c599773bdd8cf2995..571402a89368a534a7589173c465ae0d821ad2a6 100644 (file)
@@ -1129,7 +1129,7 @@ static struct platform_driver pc87427_driver = {
                .name   = DRVNAME,
        },
        .probe          = pc87427_probe,
-       .remove_new     = pc87427_remove,
+       .remove         = pc87427_remove,
 };
 
 static int __init pc87427_device_add(const struct pc87427_sio_data *sio_data)
index a4b05ebb054609b2e363913dc2c27d28fe509161..d00bd5cc6b1547ba87ea92ae70116fa1e420b6d8 100644 (file)
@@ -512,7 +512,7 @@ static struct platform_driver sch5636_driver = {
                .name   = DRVNAME,
        },
        .probe          = sch5636_probe,
-       .remove_new     = sch5636_remove,
+       .remove         = sch5636_remove,
        .id_table       = sch5636_device_id,
 };
 
index 494f9655f44f4a650888121e41c5a15af54e0978..3d55047e9baf9ad6d45d64765c4cba772def0057 100644 (file)
@@ -1051,7 +1051,7 @@ static struct platform_driver sht15_driver = {
                .of_match_table = of_match_ptr(sht15_dt_match),
        },
        .probe = sht15_probe,
-       .remove_new = sht15_remove,
+       .remove = sht15_remove,
        .id_table = sht15_device_ids,
 };
 module_platform_driver(sht15_driver);
index e73b1522f3cefaa8b0fa8f318ca7d4a0eeb3e13e..b7a7bcd6d3af0abe601b1bc5cd8890b737a9e809 100644 (file)
@@ -784,7 +784,7 @@ static struct platform_driver sis5595_driver = {
                .name   = DRIVER_NAME,
        },
        .probe          = sis5595_probe,
-       .remove_new     = sis5595_remove,
+       .remove         = sis5595_remove,
 };
 
 static int sis5595_pci_probe(struct pci_dev *dev,
index 0d46edbcb144ba27417dde9996eeb041b52007c7..595bceb78d76038d3aff8331180fdd6bd65327e6 100644 (file)
@@ -858,7 +858,7 @@ static struct platform_driver smsc47m1_driver __refdata = {
        .driver = {
                .name   = DRVNAME,
        },
-       .remove_new     = __exit_p(smsc47m1_remove),
+       .remove         = __exit_p(smsc47m1_remove),
 };
 
 static int __init smsc47m1_device_add(unsigned short address,
index 2765d5f1b7f05c726e7fab75306ddc6ecebc605a..e4f1bb538628c7db68e11a865eced42c4bf24c58 100644 (file)
@@ -317,7 +317,7 @@ static struct platform_driver env_driver = {
                .of_match_table = env_match,
        },
        .probe          = env_probe,
-       .remove_new     = env_remove,
+       .remove         = env_remove,
 };
 
 module_platform_driver(env_driver);
index 5abe95b683c0270bc5285359832f5698ad16a5fb..823bff2871e1e93bc77d067775f2bb5f6f40cb21 100644 (file)
@@ -197,7 +197,7 @@ static struct platform_driver via_cputemp_driver = {
                .name = DRVNAME,
        },
        .probe = via_cputemp_probe,
-       .remove_new = via_cputemp_remove,
+       .remove = via_cputemp_remove,
 };
 
 struct pdev_entry {
index 3a002ad3c005b8a14e40ae46563031107367f44a..bbaeb808cc15e28fec49f1cb6861eece8bfdb3a5 100644 (file)
@@ -799,7 +799,7 @@ static struct platform_driver via686a_driver = {
                .name   = DRIVER_NAME,
        },
        .probe          = via686a_probe,
-       .remove_new     = via686a_remove,
+       .remove         = via686a_remove,
 };
 
 static const struct pci_device_id via686a_pci_ids[] = {
index 2f3890463e18d789fcae547e68af439370b10099..386edea6b69e50475fb5aac3e360ad8bf9e5122d 100644 (file)
@@ -1221,7 +1221,7 @@ static struct platform_driver vt1211_driver = {
                .name  = DRVNAME,
        },
        .probe  = vt1211_probe,
-       .remove_new = vt1211_remove,
+       .remove = vt1211_remove,
 };
 
 static int __init vt1211_device_add(unsigned short address)
index dcdd14ccd115c6f7fc8e5bcfe59847a8413e3a86..3bf27c21845ba505333fc3ecafbef842fc62587b 100644 (file)
@@ -910,11 +910,11 @@ static void vt8231_remove(struct platform_device *pdev)
 
 
 static struct platform_driver vt8231_driver = {
-       .driver = {
+       .driver = {
                .name   = DRIVER_NAME,
        },
        .probe  = vt8231_probe,
-       .remove_new = vt8231_remove,
+       .remove = vt8231_remove,
 };
 
 static const struct pci_device_id vt8231_pci_ids[] = {
index 2fc9b718e2aba1d3e51c250eebc96ee311502b2d..95115d7b863e37fbfe3b4a247ea282729f717588 100644 (file)
@@ -1844,7 +1844,7 @@ static struct platform_driver w83627hf_driver = {
                .pm     = W83627HF_DEV_PM_OPS,
        },
        .probe          = w83627hf_probe,
-       .remove_new     = w83627hf_remove,
+       .remove         = w83627hf_remove,
 };
 
 static int __init w83627hf_find(int sioaddr, unsigned short *addr,
index b7957c84d2352535d461bc3275e5ad4ee824811f..076200ed2ec914ab34ac1760042f39b7977385de 100644 (file)
@@ -1828,7 +1828,7 @@ static struct platform_driver w83781d_isa_driver = {
                .name = "w83781d",
        },
        .probe = w83781d_isa_probe,
-       .remove_new = w83781d_isa_remove,
+       .remove = w83781d_isa_remove,
 };
 
 /* return 1 if a supported chip is found, 0 otherwise */
index 5e0759a70f6d51d8d2db524014d37f89b19e3ee0..1e3bd129a922d25ff25142d864503377773304a8 100644 (file)
@@ -772,7 +772,7 @@ MODULE_DEVICE_TABLE(of, xgene_hwmon_of_match);
 
 static struct platform_driver xgene_hwmon_driver = {
        .probe = xgene_hwmon_probe,
-       .remove_new = xgene_hwmon_remove,
+       .remove = xgene_hwmon_remove,
        .driver = {
                .name = "xgene-slimpro-hwmon",
                .of_match_table = xgene_hwmon_of_match,