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 93653ea..ba8c68a 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 4501f0e..b70330d 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 75eadda..4174b12 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 7fb0c57..588e967 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 1a9b28d..3d40573 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 243c570..820f894 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 7c941d3..df83f98 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 02f5d35..b22e042 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 bb30403..f0048ff 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 67471c9..66304d4 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 b5993c7..89761a9 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 788b5d5..0f8aa6b 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 7bca04e..571402a 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 a4b05eb..d00bd5c 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 494f965..3d55047 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 e73b152..b7a7bcd 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 0d46edb..595bceb 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 2765d5f..e4f1bb5 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 5abe95b..823bff2 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 3a002ad..bbaeb80 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 2f38904..386edea 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 dcdd14c..3bf27c2 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 2fc9b71..95115d7 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 b7957c8..076200e 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 5e0759a..1e3bd12 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,