diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-08-15 10:02:30 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-08-16 12:46:26 +0200 |
commit | ed5c2f5fd10dda07263f79f338a512c0f49f76f5 (patch) | |
tree | bd975d07829fffb0c29e88078d14de787b5e142d /drivers/clk | |
parent | gpio: pca953x: Make platform teardown callback return void (diff) | |
download | linux-ed5c2f5fd10dda07263f79f338a512c0f49f76f5.tar.xz linux-ed5c2f5fd10dda07263f79f338a512c0f49f76f5.zip |
i2c: Make remove callback return void
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)
So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk-cdce706.c | 3 | ||||
-rw-r--r-- | drivers/clk/clk-cs2000-cp.c | 4 | ||||
-rw-r--r-- | drivers/clk/clk-si514.c | 3 | ||||
-rw-r--r-- | drivers/clk/clk-si5341.c | 4 | ||||
-rw-r--r-- | drivers/clk/clk-si5351.c | 4 | ||||
-rw-r--r-- | drivers/clk/clk-si570.c | 3 | ||||
-rw-r--r-- | drivers/clk/clk-versaclock5.c | 4 |
7 files changed, 7 insertions, 18 deletions
diff --git a/drivers/clk/clk-cdce706.c b/drivers/clk/clk-cdce706.c index 5467d941ddfd..1449d0537674 100644 --- a/drivers/clk/clk-cdce706.c +++ b/drivers/clk/clk-cdce706.c @@ -665,10 +665,9 @@ static int cdce706_probe(struct i2c_client *client) cdce); } -static int cdce706_remove(struct i2c_client *client) +static void cdce706_remove(struct i2c_client *client) { of_clk_del_provider(client->dev.of_node); - return 0; } diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c index aa5c72bab83e..320d39922206 100644 --- a/drivers/clk/clk-cs2000-cp.c +++ b/drivers/clk/clk-cs2000-cp.c @@ -557,7 +557,7 @@ static int cs2000_version_print(struct cs2000_priv *priv) return 0; } -static int cs2000_remove(struct i2c_client *client) +static void cs2000_remove(struct i2c_client *client) { struct cs2000_priv *priv = i2c_get_clientdata(client); struct device *dev = priv_to_dev(priv); @@ -566,8 +566,6 @@ static int cs2000_remove(struct i2c_client *client) of_clk_del_provider(np); clk_hw_unregister(&priv->hw); - - return 0; } static int cs2000_probe(struct i2c_client *client) diff --git a/drivers/clk/clk-si514.c b/drivers/clk/clk-si514.c index 4481c4303534..c028fa103bed 100644 --- a/drivers/clk/clk-si514.c +++ b/drivers/clk/clk-si514.c @@ -370,10 +370,9 @@ static int si514_probe(struct i2c_client *client) return 0; } -static int si514_remove(struct i2c_client *client) +static void si514_remove(struct i2c_client *client) { of_clk_del_provider(client->dev.of_node); - return 0; } static const struct i2c_device_id si514_id[] = { diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c index 4bca73212662..0e528d7ba656 100644 --- a/drivers/clk/clk-si5341.c +++ b/drivers/clk/clk-si5341.c @@ -1796,7 +1796,7 @@ cleanup: return err; } -static int si5341_remove(struct i2c_client *client) +static void si5341_remove(struct i2c_client *client) { struct clk_si5341 *data = i2c_get_clientdata(client); int i; @@ -1807,8 +1807,6 @@ static int si5341_remove(struct i2c_client *client) if (data->clk[i].vddo_reg) regulator_disable(data->clk[i].vddo_reg); } - - return 0; } static const struct i2c_device_id si5341_id[] = { diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index b9f088c4ba2f..9e939c98a455 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c @@ -1651,11 +1651,9 @@ static int si5351_i2c_probe(struct i2c_client *client) return 0; } -static int si5351_i2c_remove(struct i2c_client *client) +static void si5351_i2c_remove(struct i2c_client *client) { of_clk_del_provider(client->dev.of_node); - - return 0; } static struct i2c_driver si5351_driver = { diff --git a/drivers/clk/clk-si570.c b/drivers/clk/clk-si570.c index 1ff8f32f734d..0a6d70c49726 100644 --- a/drivers/clk/clk-si570.c +++ b/drivers/clk/clk-si570.c @@ -498,10 +498,9 @@ static int si570_probe(struct i2c_client *client) return 0; } -static int si570_remove(struct i2c_client *client) +static void si570_remove(struct i2c_client *client) { of_clk_del_provider(client->dev.of_node); - return 0; } static const struct of_device_id clk_si570_of_match[] = { diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index e7be3e54b9be..657493ecce4c 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -1138,7 +1138,7 @@ err_clk: return ret; } -static int vc5_remove(struct i2c_client *client) +static void vc5_remove(struct i2c_client *client) { struct vc5_driver_data *vc5 = i2c_get_clientdata(client); @@ -1146,8 +1146,6 @@ static int vc5_remove(struct i2c_client *client) if (vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL) clk_unregister_fixed_rate(vc5->pin_xin); - - return 0; } static int __maybe_unused vc5_suspend(struct device *dev) |