Commit 3bce071a authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Guenter Roeck
Browse files

hwmon: (pmbus) shrink code and remove pmbus_do_remove()



The only action currently performed in pmbus_do_remove() is removing the
debugfs hierarchy. We can schedule a devm action at probe time and remove
pmbus_do_remove() entirely from all pmbus drivers.

Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20201026105352.20359-1-brgl@bgdev.pl


[groeck: Removed references to pmbus_do_remove from documentation]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent ad00a02e
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -277,12 +277,6 @@ with the pointer to struct pmbus_driver_info as additional argument. Calls
identify function if supported. Must only be called from device probe
function.

::

  void pmbus_do_remove(struct i2c_client *client);

Execute driver remove function. Similar to standard driver remove function.

::

  const struct pmbus_driver_info
+0 −6
Original line number Diff line number Diff line
@@ -148,11 +148,6 @@ Emerson DS1200 power modules might look as follows::
	return pmbus_do_probe(client, &ds1200_info);
  }

  static int ds1200_remove(struct i2c_client *client)
  {
	return pmbus_do_remove(client);
  }

  static const struct i2c_device_id ds1200_id[] = {
	{"ds1200", 0},
	{}
@@ -166,7 +161,6 @@ Emerson DS1200 power modules might look as follows::
		   .name = "ds1200",
		   },
	.probe_new = ds1200_probe,
	.remove = ds1200_remove,
	.id_table = ds1200_id,
  };

+0 −1
Original line number Diff line number Diff line
@@ -502,7 +502,6 @@ static struct i2c_driver adm1266_driver = {
		   .of_match_table = adm1266_of_match,
		  },
	.probe_new = adm1266_probe,
	.remove = pmbus_do_remove,
	.id_table = adm1266_id,
};

+0 −1
Original line number Diff line number Diff line
@@ -797,7 +797,6 @@ static struct i2c_driver adm1275_driver = {
		   .name = "adm1275",
		   },
	.probe_new = adm1275_probe,
	.remove = pmbus_do_remove,
	.id_table = adm1275_id,
};

+0 −1
Original line number Diff line number Diff line
@@ -121,7 +121,6 @@ static struct i2c_driver pfe_pmbus_driver = {
		   .name = "bel-pfe",
	},
	.probe_new = pfe_pmbus_probe,
	.remove = pmbus_do_remove,
	.id_table = pfe_device_id,
};

Loading