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>
This commit is contained in:
Uwe Kleine-König 2022-08-15 10:02:30 +02:00 committed by Wolfram Sang
parent 6a8f359c31
commit ed5c2f5fd1
619 changed files with 646 additions and 1733 deletions

View File

@ -156,7 +156,7 @@ those devices, and a remove() method to unbind.
::
static int foo_probe(struct i2c_client *client);
static int foo_remove(struct i2c_client *client);
static void foo_remove(struct i2c_client *client);
Remember that the i2c_driver does not create those client handles. The
handle may be used during foo_probe(). If foo_probe() reports success

View File

@ -178,7 +178,7 @@ err:
return ret;
}
static int mcu_remove(struct i2c_client *client)
static void mcu_remove(struct i2c_client *client)
{
struct mcu *mcu = i2c_get_clientdata(client);
@ -193,7 +193,6 @@ static int mcu_remove(struct i2c_client *client)
mcu_gpiochip_remove(mcu);
kfree(mcu);
return 0;
}
static const struct i2c_device_id mcu_ids[] = {

View File

@ -775,7 +775,7 @@ static int ht16k33_probe(struct i2c_client *client)
return err;
}
static int ht16k33_remove(struct i2c_client *client)
static void ht16k33_remove(struct i2c_client *client)
{
struct ht16k33_priv *priv = i2c_get_clientdata(client);
struct ht16k33_fbdev *fbdev = &priv->fbdev;
@ -796,8 +796,6 @@ static int ht16k33_remove(struct i2c_client *client)
device_remove_file(&client->dev, &dev_attr_map_seg14);
break;
}
return 0;
}
static const struct i2c_device_id ht16k33_i2c_match[] = {

View File

@ -340,13 +340,12 @@ fail1:
return err;
}
static int lcd2s_i2c_remove(struct i2c_client *i2c)
static void lcd2s_i2c_remove(struct i2c_client *i2c)
{
struct lcd2s_data *lcd2s = i2c_get_clientdata(i2c);
charlcd_unregister(lcd2s->charlcd);
charlcd_free(lcd2s->charlcd);
return 0;
}
static const struct i2c_device_id lcd2s_i2c_id[] = {

View File

@ -341,14 +341,12 @@ static int ipmb_probe(struct i2c_client *client)
return 0;
}
static int ipmb_remove(struct i2c_client *client)
static void ipmb_remove(struct i2c_client *client)
{
struct ipmb_dev *ipmb_dev = i2c_get_clientdata(client);
i2c_slave_unregister(client);
misc_deregister(&ipmb_dev->miscdev);
return 0;
}
static const struct i2c_device_id ipmb_id[] = {

View File

@ -424,7 +424,7 @@ static void ipmi_ipmb_request_events(void *send_info)
/* We don't fetch events here. */
}
static int ipmi_ipmb_remove(struct i2c_client *client)
static void ipmi_ipmb_remove(struct i2c_client *client)
{
struct ipmi_ipmb_dev *iidev = i2c_get_clientdata(client);
@ -438,8 +438,6 @@ static int ipmi_ipmb_remove(struct i2c_client *client)
ipmi_ipmb_stop_thread(iidev);
ipmi_unregister_smi(iidev->intf);
return 0;
}
static int ipmi_ipmb_probe(struct i2c_client *client)

View File

@ -1281,13 +1281,13 @@ static void shutdown_ssif(void *send_info)
}
}
static int ssif_remove(struct i2c_client *client)
static void ssif_remove(struct i2c_client *client)
{
struct ssif_info *ssif_info = i2c_get_clientdata(client);
struct ssif_addr_info *addr_info;
if (!ssif_info)
return 0;
return;
/*
* After this point, we won't deliver anything asychronously
@ -1303,8 +1303,6 @@ static int ssif_remove(struct i2c_client *client)
}
kfree(ssif_info);
return 0;
}
static int read_response(struct i2c_client *client, unsigned char *resp)

View File

@ -264,13 +264,11 @@ static int st33zp24_i2c_probe(struct i2c_client *client,
* @param: client, the i2c_client description (TPM I2C description).
* @return: 0 in case of success.
*/
static int st33zp24_i2c_remove(struct i2c_client *client)
static void st33zp24_i2c_remove(struct i2c_client *client)
{
struct tpm_chip *chip = i2c_get_clientdata(client);
st33zp24_remove(chip);
return 0;
}
static const struct i2c_device_id st33zp24_i2c_id[] = {

View File

@ -179,12 +179,11 @@ static int i2c_atmel_probe(struct i2c_client *client,
return tpm_chip_register(chip);
}
static int i2c_atmel_remove(struct i2c_client *client)
static void i2c_atmel_remove(struct i2c_client *client)
{
struct device *dev = &(client->dev);
struct tpm_chip *chip = dev_get_drvdata(dev);
tpm_chip_unregister(chip);
return 0;
}
static const struct i2c_device_id i2c_atmel_id[] = {

View File

@ -706,15 +706,13 @@ static int tpm_tis_i2c_probe(struct i2c_client *client,
return rc;
}
static int tpm_tis_i2c_remove(struct i2c_client *client)
static void tpm_tis_i2c_remove(struct i2c_client *client)
{
struct tpm_chip *chip = tpm_dev.chip;
tpm_chip_unregister(chip);
release_locality(chip, tpm_dev.locality, 1);
tpm_dev.client = NULL;
return 0;
}
static struct i2c_driver tpm_tis_i2c_driver = {

View File

@ -622,12 +622,11 @@ static int i2c_nuvoton_probe(struct i2c_client *client,
return tpm_chip_register(chip);
}
static int i2c_nuvoton_remove(struct i2c_client *client)
static void i2c_nuvoton_remove(struct i2c_client *client)
{
struct tpm_chip *chip = i2c_get_clientdata(client);
tpm_chip_unregister(chip);
return 0;
}
static const struct i2c_device_id i2c_nuvoton_id[] = {

View File

@ -351,13 +351,12 @@ static int tpm_tis_i2c_probe(struct i2c_client *dev,
NULL);
}
static int tpm_tis_i2c_remove(struct i2c_client *client)
static void tpm_tis_i2c_remove(struct i2c_client *client)
{
struct tpm_chip *chip = i2c_get_clientdata(client);
tpm_chip_unregister(chip);
tpm_tis_remove(chip);
return 0;
}
static const struct i2c_device_id tpm_tis_i2c_id[] = {

View File

@ -763,20 +763,18 @@ static int tpm_cr50_i2c_probe(struct i2c_client *client)
* - 0: Success.
* - -errno: A POSIX error code.
*/
static int tpm_cr50_i2c_remove(struct i2c_client *client)
static void tpm_cr50_i2c_remove(struct i2c_client *client)
{
struct tpm_chip *chip = i2c_get_clientdata(client);
struct device *dev = &client->dev;
if (!chip) {
dev_crit(dev, "Could not get client data at remove, memory corruption ahead\n");
return 0;
return;
}
tpm_chip_unregister(chip);
tpm_cr50_release_locality(chip, true);
return 0;
}
static SIMPLE_DEV_PM_OPS(cr50_i2c_pm, tpm_pm_suspend, tpm_pm_resume);

View File

@ -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;
}

View File

@ -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)

View File

@ -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[] = {

View File

@ -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[] = {

View File

@ -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 = {

View File

@ -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[] = {

View File

@ -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)

View File

@ -343,7 +343,7 @@ static int atmel_ecc_probe(struct i2c_client *client,
return ret;
}
static int atmel_ecc_remove(struct i2c_client *client)
static void atmel_ecc_remove(struct i2c_client *client)
{
struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client);
@ -358,7 +358,7 @@ static int atmel_ecc_remove(struct i2c_client *client)
* accessing the freed memory.
*/
dev_emerg(&client->dev, "Device is busy, expect memory corruption.\n");
return 0;
return;
}
crypto_unregister_kpp(&atmel_ecdh_nist_p256);
@ -366,8 +366,6 @@ static int atmel_ecc_remove(struct i2c_client *client)
spin_lock(&driver_data.i2c_list_lock);
list_del(&i2c_priv->i2c_client_list_node);
spin_unlock(&driver_data.i2c_list_lock);
return 0;
}
#ifdef CONFIG_OF

View File

@ -116,18 +116,16 @@ static int atmel_sha204a_probe(struct i2c_client *client,
return ret;
}
static int atmel_sha204a_remove(struct i2c_client *client)
static void atmel_sha204a_remove(struct i2c_client *client)
{
struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client);
if (atomic_read(&i2c_priv->tfm_count)) {
dev_emerg(&client->dev, "Device is busy, will remove it anyhow\n");
return 0;
return;
}
kfree((void *)i2c_priv->hwrng.priv);
return 0;
}
static const struct of_device_id atmel_sha204a_dt_ids[] = {

View File

@ -646,13 +646,11 @@ static int rt8973a_muic_i2c_probe(struct i2c_client *i2c,
return 0;
}
static int rt8973a_muic_i2c_remove(struct i2c_client *i2c)
static void rt8973a_muic_i2c_remove(struct i2c_client *i2c)
{
struct rt8973a_muic_info *info = i2c_get_clientdata(i2c);
regmap_del_irq_chip(info->irq, info->irq_data);
return 0;
}
static const struct of_device_id rt8973a_dt_match[] = {

View File

@ -409,14 +409,12 @@ static int adp5588_gpio_probe(struct i2c_client *client)
return 0;
}
static int adp5588_gpio_remove(struct i2c_client *client)
static void adp5588_gpio_remove(struct i2c_client *client)
{
struct adp5588_gpio *dev = i2c_get_clientdata(client);
if (dev->client->irq)
free_irq(dev->client->irq, dev);
return 0;
}
static const struct i2c_device_id adp5588_gpio_id[] = {

View File

@ -48,11 +48,9 @@ static int max7300_probe(struct i2c_client *client,
return __max730x_probe(ts);
}
static int max7300_remove(struct i2c_client *client)
static void max7300_remove(struct i2c_client *client)
{
__max730x_remove(&client->dev);
return 0;
}
static const struct i2c_device_id max7300_id[] = {

View File

@ -1101,7 +1101,7 @@ err_exit:
return ret;
}
static int pca953x_remove(struct i2c_client *client)
static void pca953x_remove(struct i2c_client *client)
{
struct pca953x_platform_data *pdata = dev_get_platdata(&client->dev);
struct pca953x_chip *chip = i2c_get_clientdata(client);
@ -1112,8 +1112,6 @@ static int pca953x_remove(struct i2c_client *client)
}
regulator_disable(chip->regulator);
return 0;
}
#ifdef CONFIG_PM_SLEEP

View File

@ -399,7 +399,7 @@ fail:
return status;
}
static int pcf857x_remove(struct i2c_client *client)
static void pcf857x_remove(struct i2c_client *client)
{
struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev);
struct pcf857x *gpio = i2c_get_clientdata(client);
@ -407,8 +407,6 @@ static int pcf857x_remove(struct i2c_client *client)
if (pdata && pdata->teardown)
pdata->teardown(client, gpio->chip.base, gpio->chip.ngpio,
pdata->context);
return 0;
}
static void pcf857x_shutdown(struct i2c_client *client)

View File

@ -126,13 +126,11 @@ static int tpic2810_probe(struct i2c_client *client,
return 0;
}
static int tpic2810_remove(struct i2c_client *client)
static void tpic2810_remove(struct i2c_client *client)
{
struct tpic2810 *gpio = i2c_get_clientdata(client);
gpiochip_remove(&gpio->chip);
return 0;
}
static const struct i2c_device_id tpic2810_id_table[] = {

View File

@ -1336,7 +1336,7 @@ uninit_regulators:
return ret;
}
static int adv7511_remove(struct i2c_client *i2c)
static void adv7511_remove(struct i2c_client *i2c)
{
struct adv7511 *adv7511 = i2c_get_clientdata(i2c);
@ -1353,8 +1353,6 @@ static int adv7511_remove(struct i2c_client *i2c)
i2c_unregister_device(adv7511->i2c_packet);
i2c_unregister_device(adv7511->i2c_edid);
return 0;
}
static const struct i2c_device_id adv7511_i2c_ids[] = {

View File

@ -787,7 +787,7 @@ err_unregister_i2c:
return err;
}
static int anx6345_i2c_remove(struct i2c_client *client)
static void anx6345_i2c_remove(struct i2c_client *client)
{
struct anx6345 *anx6345 = i2c_get_clientdata(client);
@ -798,8 +798,6 @@ static int anx6345_i2c_remove(struct i2c_client *client)
kfree(anx6345->edid);
mutex_destroy(&anx6345->lock);
return 0;
}
static const struct i2c_device_id anx6345_id[] = {

View File

@ -1357,7 +1357,7 @@ err_unregister_i2c:
return err;
}
static int anx78xx_i2c_remove(struct i2c_client *client)
static void anx78xx_i2c_remove(struct i2c_client *client)
{
struct anx78xx *anx78xx = i2c_get_clientdata(client);
@ -1366,8 +1366,6 @@ static int anx78xx_i2c_remove(struct i2c_client *client)
unregister_i2c_dummy_clients(anx78xx);
kfree(anx78xx->edid);
return 0;
}
static const struct i2c_device_id anx78xx_id[] = {

View File

@ -2689,7 +2689,7 @@ free_hdcp_wq:
return ret;
}
static int anx7625_i2c_remove(struct i2c_client *client)
static void anx7625_i2c_remove(struct i2c_client *client)
{
struct anx7625_data *platform = i2c_get_clientdata(client);
@ -2709,8 +2709,6 @@ static int anx7625_i2c_remove(struct i2c_client *client)
if (platform->pdata.audio_en)
anx7625_unregister_audio(platform);
return 0;
}
static const struct i2c_device_id anx7625_id[] = {

View File

@ -583,14 +583,12 @@ static int ch7033_probe(struct i2c_client *client,
return 0;
}
static int ch7033_remove(struct i2c_client *client)
static void ch7033_remove(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct ch7033_priv *priv = dev_get_drvdata(dev);
drm_bridge_remove(&priv->bridge);
return 0;
}
static const struct of_device_id ch7033_dt_ids[] = {

View File

@ -159,13 +159,11 @@ static int cros_ec_anx7688_bridge_probe(struct i2c_client *client)
return 0;
}
static int cros_ec_anx7688_bridge_remove(struct i2c_client *client)
static void cros_ec_anx7688_bridge_remove(struct i2c_client *client)
{
struct cros_ec_anx7688 *anx7688 = i2c_get_clientdata(client);
drm_bridge_remove(&anx7688->bridge);
return 0;
}
static const struct of_device_id cros_ec_anx7688_bridge_match_table[] = {

View File

@ -3316,7 +3316,7 @@ static int it6505_i2c_probe(struct i2c_client *client,
return 0;
}
static int it6505_i2c_remove(struct i2c_client *client)
static void it6505_i2c_remove(struct i2c_client *client)
{
struct it6505 *it6505 = i2c_get_clientdata(client);
@ -3324,8 +3324,6 @@ static int it6505_i2c_remove(struct i2c_client *client)
drm_dp_aux_unregister(&it6505->aux);
it6505_debugfs_remove(it6505);
it6505_poweroff(it6505);
return 0;
}
static const struct i2c_device_id it6505_id[] = {

View File

@ -1623,15 +1623,13 @@ static int it66121_probe(struct i2c_client *client,
return 0;
}
static int it66121_remove(struct i2c_client *client)
static void it66121_remove(struct i2c_client *client)
{
struct it66121_ctx *ctx = i2c_get_clientdata(client);
ite66121_power_off(ctx);
drm_bridge_remove(&ctx->bridge);
mutex_destroy(&ctx->lock);
return 0;
}
static const struct of_device_id it66121_dt_match[] = {

View File

@ -714,7 +714,7 @@ err_dt_parse:
return ret;
}
static int lt8912_remove(struct i2c_client *client)
static void lt8912_remove(struct i2c_client *client)
{
struct lt8912 *lt = i2c_get_clientdata(client);
@ -722,7 +722,6 @@ static int lt8912_remove(struct i2c_client *client)
drm_bridge_remove(&lt->bridge);
lt8912_free_i2c(lt);
lt8912_put_dt(lt);
return 0;
}
static const struct of_device_id lt8912_dt_match[] = {

View File

@ -766,13 +766,11 @@ static int lt9211_probe(struct i2c_client *client,
return ret;
}
static int lt9211_remove(struct i2c_client *client)
static void lt9211_remove(struct i2c_client *client)
{
struct lt9211 *ctx = i2c_get_clientdata(client);
drm_bridge_remove(&ctx->bridge);
return 0;
}
static struct i2c_device_id lt9211_id[] = {

View File

@ -1216,7 +1216,7 @@ err_of_put:
return ret;
}
static int lt9611_remove(struct i2c_client *client)
static void lt9611_remove(struct i2c_client *client)
{
struct lt9611 *lt9611 = i2c_get_clientdata(client);
@ -1228,8 +1228,6 @@ static int lt9611_remove(struct i2c_client *client)
of_node_put(lt9611->dsi1_node);
of_node_put(lt9611->dsi0_node);
return 0;
}
static struct i2c_device_id lt9611_id[] = {

View File

@ -978,7 +978,7 @@ err_of_put:
return ret;
}
static int lt9611uxc_remove(struct i2c_client *client)
static void lt9611uxc_remove(struct i2c_client *client)
{
struct lt9611uxc *lt9611uxc = i2c_get_clientdata(client);
@ -993,8 +993,6 @@ static int lt9611uxc_remove(struct i2c_client *client)
of_node_put(lt9611uxc->dsi1_node);
of_node_put(lt9611uxc->dsi0_node);
return 0;
}
static struct i2c_device_id lt9611uxc_id[] = {

View File

@ -355,11 +355,9 @@ static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c,
return ge_b850v3_register();
}
static int stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)
static void stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)
{
ge_b850v3_lvds_remove();
return 0;
}
static const struct i2c_device_id stdp4028_ge_b850v3_fw_i2c_table[] = {
@ -405,11 +403,9 @@ static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c,
return ge_b850v3_register();
}
static int stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)
static void stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)
{
ge_b850v3_lvds_remove();
return 0;
}
static const struct i2c_device_id stdp2690_ge_b850v3_fw_i2c_table[] = {

View File

@ -315,13 +315,11 @@ static int ptn3460_probe(struct i2c_client *client,
return 0;
}
static int ptn3460_remove(struct i2c_client *client)
static void ptn3460_remove(struct i2c_client *client)
{
struct ptn3460_bridge *ptn_bridge = i2c_get_clientdata(client);
drm_bridge_remove(&ptn_bridge->bridge);
return 0;
}
static const struct i2c_device_id ptn3460_i2c_table[] = {

View File

@ -520,14 +520,12 @@ static int ps8622_probe(struct i2c_client *client,
return 0;
}
static int ps8622_remove(struct i2c_client *client)
static void ps8622_remove(struct i2c_client *client)
{
struct ps8622_bridge *ps8622 = i2c_get_clientdata(client);
backlight_device_unregister(ps8622->bl);
drm_bridge_remove(&ps8622->bridge);
return 0;
}
static const struct i2c_device_id ps8622_i2c_table[] = {

View File

@ -1145,7 +1145,7 @@ static int sii902x_probe(struct i2c_client *client,
return ret;
}
static int sii902x_remove(struct i2c_client *client)
static void sii902x_remove(struct i2c_client *client)
{
struct sii902x *sii902x = i2c_get_clientdata(client);
@ -1154,8 +1154,6 @@ static int sii902x_remove(struct i2c_client *client)
drm_bridge_remove(&sii902x->bridge);
regulator_bulk_disable(ARRAY_SIZE(sii902x->supplies),
sii902x->supplies);
return 0;
}
static const struct of_device_id sii902x_dt_ids[] = {

View File

@ -936,14 +936,12 @@ static int sii9234_probe(struct i2c_client *client,
return 0;
}
static int sii9234_remove(struct i2c_client *client)
static void sii9234_remove(struct i2c_client *client)
{
struct sii9234 *ctx = i2c_get_clientdata(client);
sii9234_cable_out(ctx);
drm_bridge_remove(&ctx->bridge);
return 0;
}
static const struct of_device_id sii9234_dt_match[] = {

View File

@ -2346,7 +2346,7 @@ static int sii8620_probe(struct i2c_client *client,
return 0;
}
static int sii8620_remove(struct i2c_client *client)
static void sii8620_remove(struct i2c_client *client)
{
struct sii8620 *ctx = i2c_get_clientdata(client);
@ -2360,8 +2360,6 @@ static int sii8620_remove(struct i2c_client *client)
sii8620_cable_out(ctx);
}
drm_bridge_remove(&ctx->bridge);
return 0;
}
static const struct of_device_id sii8620_dt_match[] = {

View File

@ -2194,13 +2194,11 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
return 0;
}
static int tc_remove(struct i2c_client *client)
static void tc_remove(struct i2c_client *client)
{
struct tc_data *tc = i2c_get_clientdata(client);
drm_bridge_remove(&tc->bridge);
return 0;
}
static const struct i2c_device_id tc358767_i2c_ids[] = {

View File

@ -1072,13 +1072,11 @@ static int tc358768_i2c_probe(struct i2c_client *client,
return mipi_dsi_host_register(&priv->dsi_host);
}
static int tc358768_i2c_remove(struct i2c_client *client)
static void tc358768_i2c_remove(struct i2c_client *client)
{
struct tc358768_priv *priv = i2c_get_clientdata(client);
mipi_dsi_host_unregister(&priv->dsi_host);
return 0;
}
static struct i2c_driver tc358768_driver = {

View File

@ -704,13 +704,11 @@ err_bridge_remove:
return ret;
}
static int tc_remove(struct i2c_client *client)
static void tc_remove(struct i2c_client *client)
{
struct tc_data *tc = i2c_get_clientdata(client);
drm_bridge_remove(&tc->bridge);
return 0;
}
static const struct i2c_device_id tc358775_i2c_ids[] = {

View File

@ -379,14 +379,12 @@ err_remove_bridge:
return ret;
}
static int dlpc3433_remove(struct i2c_client *client)
static void dlpc3433_remove(struct i2c_client *client)
{
struct dlpc *dlpc = i2c_get_clientdata(client);
drm_bridge_remove(&dlpc->bridge);
of_node_put(dlpc->host_node);
return 0;
}
static const struct i2c_device_id dlpc3433_id[] = {

View File

@ -708,13 +708,11 @@ err_remove_bridge:
return ret;
}
static int sn65dsi83_remove(struct i2c_client *client)
static void sn65dsi83_remove(struct i2c_client *client)
{
struct sn65dsi83 *ctx = i2c_get_clientdata(client);
drm_bridge_remove(&ctx->bridge);
return 0;
}
static struct i2c_device_id sn65dsi83_id[] = {

View File

@ -394,11 +394,9 @@ static int tfp410_i2c_probe(struct i2c_client *client,
return tfp410_init(&client->dev, true);
}
static int tfp410_i2c_remove(struct i2c_client *client)
static void tfp410_i2c_remove(struct i2c_client *client)
{
tfp410_fini(&client->dev);
return 0;
}
static const struct i2c_device_id tfp410_i2c_ids[] = {

View File

@ -417,11 +417,9 @@ fail:
return -ENODEV;
}
static int ch7006_remove(struct i2c_client *client)
static void ch7006_remove(struct i2c_client *client)
{
ch7006_dbg(client, "\n");
return 0;
}
static int ch7006_resume(struct device *dev)

View File

@ -478,14 +478,12 @@ static int tda9950_probe(struct i2c_client *client,
return 0;
}
static int tda9950_remove(struct i2c_client *client)
static void tda9950_remove(struct i2c_client *client)
{
struct tda9950_priv *priv = i2c_get_clientdata(client);
cec_notifier_cec_adap_unregister(priv->notify, priv->adap);
cec_unregister_adapter(priv->adap);
return 0;
}
static struct i2c_device_id tda9950_ids[] = {

View File

@ -2076,11 +2076,10 @@ tda998x_probe(struct i2c_client *client, const struct i2c_device_id *id)
return ret;
}
static int tda998x_remove(struct i2c_client *client)
static void tda998x_remove(struct i2c_client *client)
{
component_del(&client->dev, &tda998x_ops);
tda998x_destroy(&client->dev);
return 0;
}
#ifdef CONFIG_OF

View File

@ -288,7 +288,7 @@ static int lcd_olinuxino_probe(struct i2c_client *client,
return 0;
}
static int lcd_olinuxino_remove(struct i2c_client *client)
static void lcd_olinuxino_remove(struct i2c_client *client)
{
struct lcd_olinuxino *panel = i2c_get_clientdata(client);
@ -296,8 +296,6 @@ static int lcd_olinuxino_remove(struct i2c_client *client)
drm_panel_disable(&panel->panel);
drm_panel_unprepare(&panel->panel);
return 0;
}
static const struct of_device_id lcd_olinuxino_of_ids[] = {

View File

@ -446,7 +446,7 @@ error:
return -ENODEV;
}
static int rpi_touchscreen_remove(struct i2c_client *i2c)
static void rpi_touchscreen_remove(struct i2c_client *i2c)
{
struct rpi_touchscreen *ts = i2c_get_clientdata(i2c);
@ -455,8 +455,6 @@ static int rpi_touchscreen_remove(struct i2c_client *i2c)
drm_panel_remove(&ts->base);
mipi_dsi_device_unregister(ts->dsi);
return 0;
}
static int rpi_touchscreen_dsi_probe(struct mipi_dsi_device *dsi)

View File

@ -39,13 +39,11 @@ static int ssd130x_i2c_probe(struct i2c_client *client)
return 0;
}
static int ssd130x_i2c_remove(struct i2c_client *client)
static void ssd130x_i2c_remove(struct i2c_client *client)
{
struct ssd130x_device *ssd130x = i2c_get_clientdata(client);
ssd130x_remove(ssd130x);
return 0;
}
static void ssd130x_i2c_shutdown(struct i2c_client *client)

View File

@ -1064,7 +1064,7 @@ err_powered:
}
EXPORT_SYMBOL_GPL(i2c_hid_core_probe);
int i2c_hid_core_remove(struct i2c_client *client)
void i2c_hid_core_remove(struct i2c_client *client)
{
struct i2c_hid *ihid = i2c_get_clientdata(client);
struct hid_device *hid;
@ -1078,8 +1078,6 @@ int i2c_hid_core_remove(struct i2c_client *client)
i2c_hid_free_buffers(ihid);
i2c_hid_core_power_down(ihid);
return 0;
}
EXPORT_SYMBOL_GPL(i2c_hid_core_remove);

View File

@ -33,7 +33,7 @@ struct i2chid_ops {
int i2c_hid_core_probe(struct i2c_client *client, struct i2chid_ops *ops,
u16 hid_descriptor_address, u32 quirks);
int i2c_hid_core_remove(struct i2c_client *client);
void i2c_hid_core_remove(struct i2c_client *client);
void i2c_hid_core_shutdown(struct i2c_client *client);

View File

@ -495,14 +495,12 @@ error:
return err;
}
static int adc128_remove(struct i2c_client *client)
static void adc128_remove(struct i2c_client *client)
{
struct adc128_data *data = i2c_get_clientdata(client);
if (data->regulator)
regulator_disable(data->regulator);
return 0;
}
static const struct i2c_device_id adc128_id[] = {

View File

@ -1296,12 +1296,11 @@ static int adt7470_probe(struct i2c_client *client)
return 0;
}
static int adt7470_remove(struct i2c_client *client)
static void adt7470_remove(struct i2c_client *client)
{
struct adt7470_data *data = i2c_get_clientdata(client);
kthread_stop(data->auto_update);
return 0;
}
static const struct i2c_device_id adt7470_id[] = {

View File

@ -208,7 +208,7 @@ static void asb100_write_value(struct i2c_client *client, u16 reg, u16 val);
static int asb100_probe(struct i2c_client *client);
static int asb100_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int asb100_remove(struct i2c_client *client);
static void asb100_remove(struct i2c_client *client);
static struct asb100_data *asb100_update_device(struct device *dev);
static void asb100_init_client(struct i2c_client *client);
@ -822,7 +822,7 @@ ERROR3:
return err;
}
static int asb100_remove(struct i2c_client *client)
static void asb100_remove(struct i2c_client *client)
{
struct asb100_data *data = i2c_get_clientdata(client);
@ -831,8 +831,6 @@ static int asb100_remove(struct i2c_client *client)
i2c_unregister_device(data->lm75[1]);
i2c_unregister_device(data->lm75[0]);
return 0;
}
/*

View File

@ -1165,7 +1165,7 @@ static int asc7621_detect(struct i2c_client *client,
return -ENODEV;
}
static int asc7621_remove(struct i2c_client *client)
static void asc7621_remove(struct i2c_client *client)
{
struct asc7621_data *data = i2c_get_clientdata(client);
int i;
@ -1176,8 +1176,6 @@ static int asc7621_remove(struct i2c_client *client)
device_remove_file(&client->dev,
&(asc7621_params[i].sda.dev_attr));
}
return 0;
}
static const struct i2c_device_id asc7621_id[] = {

View File

@ -2508,14 +2508,12 @@ exit_remove:
return err;
}
static int dme1737_i2c_remove(struct i2c_client *client)
static void dme1737_i2c_remove(struct i2c_client *client)
{
struct dme1737_data *data = i2c_get_clientdata(client);
hwmon_device_unregister(data->hwmon_dev);
dme1737_remove_files(&client->dev);
return 0;
}
static const struct i2c_device_id dme1737_id[] = {

View File

@ -114,7 +114,7 @@ struct f75375_data {
static int f75375_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int f75375_probe(struct i2c_client *client);
static int f75375_remove(struct i2c_client *client);
static void f75375_remove(struct i2c_client *client);
static const struct i2c_device_id f75375_id[] = {
{ "f75373", f75373 },
@ -864,12 +864,11 @@ exit_remove:
return err;
}
static int f75375_remove(struct i2c_client *client)
static void f75375_remove(struct i2c_client *client)
{
struct f75375_data *data = i2c_get_clientdata(client);
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &f75375_group);
return 0;
}
/* Return 0 if detection is successful, -ENODEV otherwise */

View File

@ -217,7 +217,7 @@ static const int FSCHMD_NO_TEMP_SENSORS[7] = { 3, 3, 4, 3, 5, 5, 11 };
static int fschmd_probe(struct i2c_client *client);
static int fschmd_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int fschmd_remove(struct i2c_client *client);
static void fschmd_remove(struct i2c_client *client);
static struct fschmd_data *fschmd_update_device(struct device *dev);
/*
@ -1248,7 +1248,7 @@ exit_detach:
return err;
}
static int fschmd_remove(struct i2c_client *client)
static void fschmd_remove(struct i2c_client *client)
{
struct fschmd_data *data = i2c_get_clientdata(client);
int i;
@ -1291,8 +1291,6 @@ static int fschmd_remove(struct i2c_client *client)
mutex_lock(&watchdog_data_mutex);
kref_put(&data->kref, fschmd_release_resources);
mutex_unlock(&watchdog_data_mutex);
return 0;
}
static struct fschmd_data *fschmd_update_device(struct device *dev)

View File

@ -744,12 +744,11 @@ static int fts_detect(struct i2c_client *client,
return 0;
}
static int fts_remove(struct i2c_client *client)
static void fts_remove(struct i2c_client *client)
{
struct fts_data *data = dev_get_drvdata(&client->dev);
watchdog_unregister_device(&data->wdd);
return 0;
}
static int fts_probe(struct i2c_client *client)

View File

@ -568,13 +568,11 @@ out_restore_conf:
return ret;
}
static int ina209_remove(struct i2c_client *client)
static void ina209_remove(struct i2c_client *client)
{
struct ina209_data *data = i2c_get_clientdata(client);
ina209_restore_conf(client, data);
return 0;
}
static const struct i2c_device_id ina209_id[] = {

View File

@ -913,7 +913,7 @@ fail:
return ret;
}
static int ina3221_remove(struct i2c_client *client)
static void ina3221_remove(struct i2c_client *client)
{
struct ina3221_data *ina = dev_get_drvdata(&client->dev);
int i;
@ -926,8 +926,6 @@ static int ina3221_remove(struct i2c_client *client)
pm_runtime_put_noidle(ina->pm_dev);
mutex_destroy(&ina->lock);
return 0;
}
static int __maybe_unused ina3221_suspend(struct device *dev)

View File

@ -524,7 +524,7 @@ static int jc42_probe(struct i2c_client *client)
return PTR_ERR_OR_ZERO(hwmon_dev);
}
static int jc42_remove(struct i2c_client *client)
static void jc42_remove(struct i2c_client *client)
{
struct jc42_data *data = i2c_get_clientdata(client);
@ -537,7 +537,6 @@ static int jc42_remove(struct i2c_client *client)
| (data->config & JC42_CFG_HYST_MASK);
i2c_smbus_write_word_swapped(client, JC42_REG_CONFIG, config);
}
return 0;
}
#ifdef CONFIG_PM

View File

@ -227,13 +227,11 @@ static int p8_i2c_occ_probe(struct i2c_client *client)
return occ_setup(occ);
}
static int p8_i2c_occ_remove(struct i2c_client *client)
static void p8_i2c_occ_remove(struct i2c_client *client)
{
struct occ *occ = dev_get_drvdata(&client->dev);
occ_shutdown(occ);
return 0;
}
static const struct of_device_id p8_i2c_occ_of_match[] = {

View File

@ -228,14 +228,13 @@ exit_sysfs_remove:
return err;
}
static int pcf8591_remove(struct i2c_client *client)
static void pcf8591_remove(struct i2c_client *client)
{
struct pcf8591_data *data = i2c_get_clientdata(client);
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group_opt);
sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group);
return 0;
}
/* Called when we have found a new PCF8591. */

View File

@ -671,12 +671,11 @@ out_unregister:
return ret;
}
static int smm665_remove(struct i2c_client *client)
static void smm665_remove(struct i2c_client *client)
{
struct smm665_data *data = i2c_get_clientdata(client);
i2c_unregister_device(data->cmdreg);
return 0;
}
static const struct i2c_device_id smm665_id[] = {

View File

@ -588,13 +588,11 @@ static int tps23861_probe(struct i2c_client *client)
return 0;
}
static int tps23861_remove(struct i2c_client *client)
static void tps23861_remove(struct i2c_client *client)
{
struct tps23861_data *data = i2c_get_clientdata(client);
debugfs_remove_recursive(data->debugfs_dir);
return 0;
}
static const struct of_device_id __maybe_unused tps23861_of_match[] = {

View File

@ -1239,7 +1239,7 @@ static int w83781d_probe(struct i2c_client *client)
return err;
}
static int
static void
w83781d_remove(struct i2c_client *client)
{
struct w83781d_data *data = i2c_get_clientdata(client);
@ -1250,8 +1250,6 @@ w83781d_remove(struct i2c_client *client)
i2c_unregister_device(data->lm75[0]);
i2c_unregister_device(data->lm75[1]);
return 0;
}
static int

View File

@ -315,7 +315,7 @@ struct w83791d_data {
static int w83791d_probe(struct i2c_client *client);
static int w83791d_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int w83791d_remove(struct i2c_client *client);
static void w83791d_remove(struct i2c_client *client);
static int w83791d_read(struct i2c_client *client, u8 reg);
static int w83791d_write(struct i2c_client *client, u8 reg, u8 value);
@ -1405,14 +1405,12 @@ error4:
return err;
}
static int w83791d_remove(struct i2c_client *client)
static void w83791d_remove(struct i2c_client *client)
{
struct w83791d_data *data = i2c_get_clientdata(client);
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &w83791d_group);
return 0;
}
static void w83791d_init_client(struct i2c_client *client)

View File

@ -286,7 +286,7 @@ struct w83792d_data {
static int w83792d_probe(struct i2c_client *client);
static int w83792d_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int w83792d_remove(struct i2c_client *client);
static void w83792d_remove(struct i2c_client *client);
static struct w83792d_data *w83792d_update_device(struct device *dev);
#ifdef DEBUG
@ -1429,7 +1429,7 @@ exit_remove_files:
return err;
}
static int
static void
w83792d_remove(struct i2c_client *client)
{
struct w83792d_data *data = i2c_get_clientdata(client);
@ -1440,8 +1440,6 @@ w83792d_remove(struct i2c_client *client)
for (i = 0; i < ARRAY_SIZE(w83792d_group_fan); i++)
sysfs_remove_group(&client->dev.kobj,
&w83792d_group_fan[i]);
return 0;
}
static void

View File

@ -285,7 +285,7 @@ static int w83793_write_value(struct i2c_client *client, u16 reg, u8 value);
static int w83793_probe(struct i2c_client *client);
static int w83793_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int w83793_remove(struct i2c_client *client);
static void w83793_remove(struct i2c_client *client);
static void w83793_init_client(struct i2c_client *client);
static void w83793_update_nonvolatile(struct device *dev);
static struct w83793_data *w83793_update_device(struct device *dev);
@ -1495,7 +1495,7 @@ static struct notifier_block watchdog_notifier = {
* Init / remove routines
*/
static int w83793_remove(struct i2c_client *client)
static void w83793_remove(struct i2c_client *client)
{
struct w83793_data *data = i2c_get_clientdata(client);
struct device *dev = &client->dev;
@ -1554,8 +1554,6 @@ static int w83793_remove(struct i2c_client *client)
mutex_lock(&watchdog_data_mutex);
kref_put(&data->kref, w83793_release_resources);
mutex_unlock(&watchdog_data_mutex);
return 0;
}
static int

View File

@ -2235,14 +2235,12 @@ exit_remove:
return err;
}
static int w83795_remove(struct i2c_client *client)
static void w83795_remove(struct i2c_client *client)
{
struct w83795_data *data = i2c_get_clientdata(client);
hwmon_device_unregister(data->hwmon_dev);
w83795_handle_files(&client->dev, device_remove_file_wrapper);
return 0;
}

View File

@ -65,7 +65,7 @@ static const unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
static int w83l785ts_probe(struct i2c_client *client);
static int w83l785ts_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int w83l785ts_remove(struct i2c_client *client);
static void w83l785ts_remove(struct i2c_client *client);
static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval);
static struct w83l785ts_data *w83l785ts_update_device(struct device *dev);
@ -203,7 +203,7 @@ exit_remove:
return err;
}
static int w83l785ts_remove(struct i2c_client *client)
static void w83l785ts_remove(struct i2c_client *client)
{
struct w83l785ts_data *data = i2c_get_clientdata(client);
@ -212,8 +212,6 @@ static int w83l785ts_remove(struct i2c_client *client)
&sensor_dev_attr_temp1_input.dev_attr);
device_remove_file(&client->dev,
&sensor_dev_attr_temp1_max.dev_attr);
return 0;
}
static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval)

View File

@ -599,13 +599,9 @@ static void i2c_device_remove(struct device *dev)
driver = to_i2c_driver(dev->driver);
if (driver->remove) {
int status;
dev_dbg(dev, "remove\n");
status = driver->remove(client);
if (status)
dev_warn(dev, "remove failed (%pe), will be ignored\n", ERR_PTR(status));
driver->remove(client);
}
devres_release_group(&client->dev, client->devres_group_id);

View File

@ -181,14 +181,12 @@ static int i2c_slave_eeprom_probe(struct i2c_client *client, const struct i2c_de
return 0;
};
static int i2c_slave_eeprom_remove(struct i2c_client *client)
static void i2c_slave_eeprom_remove(struct i2c_client *client)
{
struct eeprom_data *eeprom = i2c_get_clientdata(client);
i2c_slave_unregister(client);
sysfs_remove_bin_file(&client->dev.kobj, &eeprom->bin);
return 0;
}
static const struct i2c_device_id i2c_slave_eeprom_id[] = {

View File

@ -153,13 +153,12 @@ static int i2c_slave_testunit_probe(struct i2c_client *client)
return i2c_slave_register(client, i2c_slave_testunit_slave_cb);
};
static int i2c_slave_testunit_remove(struct i2c_client *client)
static void i2c_slave_testunit_remove(struct i2c_client *client)
{
struct testunit_data *tu = i2c_get_clientdata(client);
cancel_delayed_work_sync(&tu->worker);
i2c_slave_unregister(client);
return 0;
}
static const struct i2c_device_id i2c_slave_testunit_id[] = {

View File

@ -153,12 +153,11 @@ static int smbalert_probe(struct i2c_client *ara,
}
/* IRQ and memory resources are managed so they are freed automatically */
static int smbalert_remove(struct i2c_client *ara)
static void smbalert_remove(struct i2c_client *ara)
{
struct i2c_smbus_alert *alert = i2c_get_clientdata(ara);
cancel_work_sync(&alert->alert);
return 0;
}
static const struct i2c_device_id smbalert_ids[] = {

View File

@ -294,13 +294,11 @@ static int ltc4306_probe(struct i2c_client *client)
return 0;
}
static int ltc4306_remove(struct i2c_client *client)
static void ltc4306_remove(struct i2c_client *client)
{
struct i2c_mux_core *muxc = i2c_get_clientdata(client);
i2c_mux_del_adapters(muxc);
return 0;
}
static struct i2c_driver ltc4306_driver = {

View File

@ -325,12 +325,11 @@ static int pca9541_probe(struct i2c_client *client,
return 0;
}
static int pca9541_remove(struct i2c_client *client)
static void pca9541_remove(struct i2c_client *client)
{
struct i2c_mux_core *muxc = i2c_get_clientdata(client);
i2c_mux_del_adapters(muxc);
return 0;
}
static struct i2c_driver pca9541_driver = {

View File

@ -521,14 +521,13 @@ fail_cleanup:
return ret;
}
static int pca954x_remove(struct i2c_client *client)
static void pca954x_remove(struct i2c_client *client)
{
struct i2c_mux_core *muxc = i2c_get_clientdata(client);
device_remove_file(&client->dev, &dev_attr_idle_state);
pca954x_cleanup(muxc);
return 0;
}
#ifdef CONFIG_PM_SLEEP

View File

@ -1045,7 +1045,7 @@ err_disable_vdd:
return ret;
}
static int bma180_remove(struct i2c_client *client)
static void bma180_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
struct bma180_data *data = iio_priv(indio_dev);
@ -1062,8 +1062,6 @@ static int bma180_remove(struct i2c_client *client)
mutex_unlock(&data->mutex);
regulator_disable(data->vddio_supply);
regulator_disable(data->vdd_supply);
return 0;
}
static int bma180_suspend(struct device *dev)

View File

@ -209,13 +209,11 @@ static int bmc150_accel_probe(struct i2c_client *client,
return 0;
}
static int bmc150_accel_remove(struct i2c_client *client)
static void bmc150_accel_remove(struct i2c_client *client)
{
bmc150_acpi_dual_accel_remove(client);
bmc150_accel_core_remove(&client->dev);
return 0;
}
static const struct acpi_device_id bmc150_accel_acpi_match[] = {

View File

@ -1611,7 +1611,7 @@ err_poweroff:
return ret;
}
static int kxcjk1013_remove(struct i2c_client *client)
static void kxcjk1013_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
struct kxcjk1013_data *data = iio_priv(indio_dev);
@ -1630,8 +1630,6 @@ static int kxcjk1013_remove(struct i2c_client *client)
mutex_lock(&data->mutex);
kxcjk1013_set_mode(data, STANDBY);
mutex_unlock(&data->mutex);
return 0;
}
#ifdef CONFIG_PM_SLEEP

View File

@ -32,11 +32,9 @@ static int kxsd9_i2c_probe(struct i2c_client *i2c,
i2c->name);
}
static int kxsd9_i2c_remove(struct i2c_client *client)
static void kxsd9_i2c_remove(struct i2c_client *client)
{
kxsd9_common_remove(&client->dev);
return 0;
}
static const struct of_device_id kxsd9_of_match[] = {

View File

@ -151,15 +151,13 @@ static int mc3230_probe(struct i2c_client *client,
return ret;
}
static int mc3230_remove(struct i2c_client *client)
static void mc3230_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
iio_device_unregister(indio_dev);
mc3230_set_opcon(iio_priv(indio_dev), MC3230_MODE_OPCON_STANDBY);
return 0;
}
static int mc3230_suspend(struct device *dev)

View File

@ -26,11 +26,9 @@ static int mma7455_i2c_probe(struct i2c_client *i2c,
return mma7455_core_probe(&i2c->dev, regmap, name);
}
static int mma7455_i2c_remove(struct i2c_client *i2c)
static void mma7455_i2c_remove(struct i2c_client *i2c)
{
mma7455_core_remove(&i2c->dev);
return 0;
}
static const struct i2c_device_id mma7455_i2c_ids[] = {

View File

@ -207,7 +207,7 @@ static int mma7660_probe(struct i2c_client *client,
return ret;
}
static int mma7660_remove(struct i2c_client *client)
static void mma7660_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
int ret;
@ -218,8 +218,6 @@ static int mma7660_remove(struct i2c_client *client)
if (ret)
dev_warn(&client->dev, "Failed to put device in stand-by mode (%pe), ignoring\n",
ERR_PTR(ret));
return 0;
}
static int mma7660_suspend(struct device *dev)

View File

@ -1735,7 +1735,7 @@ disable_regulator_vdd:
return ret;
}
static int mma8452_remove(struct i2c_client *client)
static void mma8452_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
struct mma8452_data *data = iio_priv(indio_dev);
@ -1751,8 +1751,6 @@ static int mma8452_remove(struct i2c_client *client)
regulator_disable(data->vddio_reg);
regulator_disable(data->vdd_reg);
return 0;
}
#ifdef CONFIG_PM

View File

@ -509,7 +509,7 @@ out_poweroff:
return ret;
}
static int mma9551_remove(struct i2c_client *client)
static void mma9551_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
struct mma9551_data *data = iio_priv(indio_dev);
@ -522,8 +522,6 @@ static int mma9551_remove(struct i2c_client *client)
mutex_lock(&data->mutex);
mma9551_set_device_state(data->client, false);
mutex_unlock(&data->mutex);
return 0;
}
static int mma9551_runtime_suspend(struct device *dev)

View File

@ -1148,7 +1148,7 @@ out_poweroff:
return ret;
}
static int mma9553_remove(struct i2c_client *client)
static void mma9553_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
struct mma9553_data *data = iio_priv(indio_dev);
@ -1161,8 +1161,6 @@ static int mma9553_remove(struct i2c_client *client)
mutex_lock(&data->mutex);
mma9551_set_device_state(data->client, false);
mutex_unlock(&data->mutex);
return 0;
}
static int mma9553_runtime_suspend(struct device *dev)

View File

@ -597,7 +597,7 @@ err_power_off:
return ret;
}
static int stk8312_remove(struct i2c_client *client)
static void stk8312_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
struct stk8312_data *data = iio_priv(indio_dev);
@ -609,8 +609,6 @@ static int stk8312_remove(struct i2c_client *client)
iio_trigger_unregister(data->dready_trig);
stk8312_set_mode(data, STK8312_MODE_STANDBY);
return 0;
}
static int stk8312_suspend(struct device *dev)

View File

@ -490,7 +490,7 @@ err_power_off:
return ret;
}
static int stk8ba50_remove(struct i2c_client *client)
static void stk8ba50_remove(struct i2c_client *client)
{
struct iio_dev *indio_dev = i2c_get_clientdata(client);
struct stk8ba50_data *data = iio_priv(indio_dev);
@ -502,8 +502,6 @@ static int stk8ba50_remove(struct i2c_client *client)
iio_trigger_unregister(data->dready_trig);
stk8ba50_set_power(data, STK8BA50_MODE_SUSPEND);
return 0;
}
static int stk8ba50_suspend(struct device *dev)

Some files were not shown because too many files have changed in this diff Show More