Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
Subsystems (14)
cover Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
---
drivers/i2c/busses/i2c-ali1535.c | 2 +- drivers/i2c/busses/i2c-ali1563.c | 2 +- drivers/i2c/busses/i2c-ali15x3.c | 2 +- drivers/i2c/busses/i2c-amd756.c | 2 +- drivers/i2c/busses/i2c-amd8111.c | 2 +- drivers/i2c/busses/i2c-elektor.c | 2 +- drivers/i2c/busses/i2c-gpio.c | 2 +- drivers/i2c/busses/i2c-ibm_iic.c | 2 +- drivers/i2c/busses/i2c-iop3xx.c | 2 +- drivers/i2c/busses/i2c-isch.c | 2 +- drivers/i2c/busses/i2c-kempld.c | 4 ++-- drivers/i2c/busses/i2c-mlxcpld.c | 2 +- drivers/i2c/busses/i2c-nforce2.c | 2 +- drivers/i2c/busses/i2c-pasemi-pci.c | 2 +- drivers/i2c/busses/i2c-piix4.c | 2 +- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/i2c/busses/i2c-sh7760.c | 2 +- drivers/i2c/busses/i2c-sibyte.c | 4 ++-- drivers/i2c/busses/i2c-sis5595.c | 2 +- drivers/i2c/busses/i2c-sis630.c | 2 +- drivers/i2c/busses/i2c-sis96x.c | 2 +- drivers/i2c/busses/i2c-via.c | 2 +- drivers/i2c/busses/i2c-viapro.c | 2 +- drivers/i2c/busses/scx200_acb.c | 2 +- drivers/i2c/i2c-stub.c | 2 +- drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 2 +- drivers/staging/greybus/i2c.c | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-)
PATCH 1/10 drivers/i2c/busses: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/i2c/busses/i2c-ali1535.c | 2 +- drivers/i2c/busses/i2c-ali15x3.c | 2 +- drivers/i2c/busses/i2c-amd756.c | 2 +- drivers/i2c/busses/i2c-amd8111.c | 2 +- drivers/i2c/busses/i2c-isch.c | 2 +- drivers/i2c/busses/i2c-nforce2.c | 2 +- drivers/i2c/busses/i2c-piix4.c | 2 +- drivers/i2c/busses/i2c-sis5595.c | 2 +- drivers/i2c/busses/i2c-sis630.c | 2 +- drivers/i2c/busses/i2c-sis96x.c | 2 +- drivers/i2c/busses/i2c-via.c | 2 +- drivers/i2c/busses/i2c-viapro.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)
drivers/i2c/busses/i2c-ali1535.c +1 -1
@@ -477,7 +477,7 @@ static const struct i2c_algorithm smbus_algorithm = {static struct i2c_adapter ali1535_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, };
drivers/i2c/busses/i2c-ali15x3.c +1 -1
@@ -461,7 +461,7 @@ static const struct i2c_algorithm smbus_algorithm = {static struct i2c_adapter ali15x3_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, };
drivers/i2c/busses/i2c-amd756.c +1 -1
@@ -285,7 +285,7 @@ static const struct i2c_algorithm smbus_algorithm = {struct i2c_adapter amd756_smbus = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, };
drivers/i2c/busses/i2c-amd8111.c +1 -1
@@ -449,7 +449,7 @@ static int amd8111_probe(struct pci_dev *dev, const struct pci_device_id *id) smbus->adapter.owner =THIS_MODULE ;snprintf (smbus->adapter.name,sizeof (smbus->adapter.name),"SMBus2 AMD8111 adapter at %04x" , smbus->base); - smbus->adapter.class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + smbus->adapter.class =I2C_CLASS_HWMON ; smbus->adapter.algo = &smbus_algorithm; smbus->adapter.algo_data = smbus;
drivers/i2c/busses/i2c-isch.c +1 -1
@@ -249,7 +249,7 @@ static const struct i2c_algorithm smbus_algorithm = {static struct i2c_adapter sch_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, };
drivers/i2c/busses/i2c-nforce2.c +1 -1
@@ -349,7 +349,7 @@ static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg,return -EBUSY ; } smbus->adapter.owner =THIS_MODULE ; - smbus->adapter.class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + smbus->adapter.class =I2C_CLASS_HWMON ; smbus->adapter.algo = &smbus_algorithm; smbus->adapter.algo_data = smbus; smbus->adapter.dev.parent = &dev->dev;
drivers/i2c/busses/i2c-piix4.c +1 -1
@@ -943,7 +943,7 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba, } adap->owner =THIS_MODULE ; - adap->class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + adap->class =I2C_CLASS_HWMON ; adap->algo = sb800_main ? &piix4_smbus_algorithm_sb800 : &smbus_algorithm;
drivers/i2c/busses/i2c-sis5595.c +1 -1
@@ -353,7 +353,7 @@ static const struct i2c_algorithm smbus_algorithm = {static struct i2c_adapter sis5595_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, };
drivers/i2c/busses/i2c-sis630.c +1 -1
@@ -493,7 +493,7 @@ static const struct i2c_algorithm smbus_algorithm = {static struct i2c_adapter sis630_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, .retries =3 };
drivers/i2c/busses/i2c-sis96x.c +1 -1
@@ -228,7 +228,7 @@ static const struct i2c_algorithm smbus_algorithm = {static struct i2c_adapter sis96x_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, };
drivers/i2c/busses/i2c-via.c +1 -1
@@ -70,7 +70,7 @@ static struct i2c_algo_bit_data bit_data = {static struct i2c_adapter vt586b_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .name ="VIA i2c" , .algo_data = &bit_data, };
drivers/i2c/busses/i2c-viapro.c +1 -1
@@ -304,7 +304,7 @@ static const struct i2c_algorithm smbus_algorithm = {static struct i2c_adapter vt596_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, };
PATCH 2/10 drivers/staging/greybus/i2c.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/staging/greybus/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/i2c.c +1 -1
@@ -264,7 +264,7 @@ static int gb_i2c_probe(struct gbphy_device *gbphy_dev,/* Looks good; up our i2c adapter */ adapter = &gb_i2c_dev->adapter; adapter->owner =THIS_MODULE ; - adapter->class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + adapter->class =I2C_CLASS_HWMON ; adapter->algo = &gb_i2c_algorithm; adapter->dev.parent = &gbphy_dev->dev;
PATCH 3/10 drivers/i2c/busses/i2c-pasemi-pci.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/i2c/busses/i2c-pasemi-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-pasemi-pci.c +1 -1
@@ -56,7 +56,7 @@ static int pasemi_smb_pci_probe(struct pci_dev *dev,if (!smbus->ioaddr)return -EBUSY ; - smbus->adapter.class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + smbus->adapter.class =I2C_CLASS_HWMON ; error =pasemi_i2c_common_probe (smbus);if (error)return error;
PATCH 4/10 drivers/i2c/i2c-stub.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/i2c/i2c-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/i2c-stub.c +1 -1
@@ -308,7 +308,7 @@ static const struct i2c_algorithm smbus_algorithm = {static struct i2c_adapter stub_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &smbus_algorithm, .name ="SMBus stub driver" , };
PATCH 5/10 drivers/i2c/busses: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/i2c/busses/i2c-elektor.c | 2 +- drivers/i2c/busses/i2c-ibm_iic.c | 2 +- drivers/i2c/busses/i2c-iop3xx.c | 2 +- drivers/i2c/busses/i2c-kempld.c | 4 ++-- drivers/i2c/busses/i2c-scmi.c | 2 +- drivers/i2c/busses/i2c-sh7760.c | 2 +- drivers/i2c/busses/i2c-sibyte.c | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-)
drivers/i2c/busses/i2c-elektor.c +1 -1
@@ -188,7 +188,7 @@ static struct i2c_algo_pcf_data pcf_isa_data = {static struct i2c_adapter pcf_isa_ops = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo_data = &pcf_isa_data, .name ="i2c-elektor" , };
drivers/i2c/busses/i2c-ibm_iic.c +1 -1
@@ -739,7 +739,7 @@ static int iic_probe(struct platform_device *ofdev) adap->dev.of_node =of_node_get (np);strscpy (adap->name,"IBM IIC" ,sizeof (adap->name));i2c_set_adapdata (adap, dev); - adap->class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + adap->class =I2C_CLASS_HWMON ; adap->algo = &iic_algo; adap->timeout =HZ ;
drivers/i2c/busses/i2c-iop3xx.c +1 -1
@@ -478,7 +478,7 @@ iop3xx_i2c_probe(struct platform_device *pdev)memcpy (new_adapter->name, pdev->name,strlen (pdev->name)); new_adapter->owner =THIS_MODULE ; - new_adapter->class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + new_adapter->class =I2C_CLASS_HWMON ; new_adapter->dev.parent = &pdev->dev; new_adapter->dev.of_node = pdev->dev.of_node; new_adapter->nr = pdev->id;
drivers/i2c/busses/i2c-kempld.c +2 -2
@@ -283,8 +283,8 @@ static const struct i2c_algorithm kempld_i2c_algorithm = {static const struct i2c_adapter kempld_i2c_adapter = { .owner =THIS_MODULE , .name ="i2c-kempld" , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD | -I2C_CLASS_DEPRECATED , + .class =I2C_CLASS_HWMON | +I2C_CLASS_DEPRECATED , .algo = &kempld_i2c_algorithm, };
drivers/i2c/busses/i2c-scmi.c +1 -1
@@ -385,7 +385,7 @@ static int smbus_cmi_probe(struct platform_device *device) smbus_cmi->adapter.owner =THIS_MODULE ; smbus_cmi->adapter.algo = &acpi_smbus_cmi_algorithm; smbus_cmi->adapter.algo_data = smbus_cmi; - smbus_cmi->adapter.class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + smbus_cmi->adapter.class =I2C_CLASS_HWMON ; smbus_cmi->adapter.dev.parent = &device->dev; ret =i2c_add_adapter (&smbus_cmi->adapter);
drivers/i2c/busses/i2c-sh7760.c +1 -1
@@ -477,7 +477,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev) id->adap.nr = pdev->id; id->adap.algo = &sh7760_i2c_algo; - id->adap.class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + id->adap.class =I2C_CLASS_HWMON ; id->adap.retries =3 ; id->adap.algo_data = id; id->adap.dev.parent = &pdev->dev;
drivers/i2c/busses/i2c-sibyte.c +2 -2
@@ -142,7 +142,7 @@ static struct i2c_algo_sibyte_data sibyte_board_data[2] = {static struct i2c_adapter sibyte_board_adapter[2 ] = { { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo =NULL , .algo_data = &sibyte_board_data[0 ], .nr =0 ,
@@ -150,7 +150,7 @@ static struct i2c_adapter sibyte_board_adapter[2] = { }, { .owner = THIS_MODULE, - .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, + .class = I2C_CLASS_HWMON, .algo = NULL, .algo_data = &sibyte_board_data[1], .nr = 1,
PATCH 6/10 drivers/i2c/busses/i2c-gpio.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/i2c/busses/i2c-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-gpio.c +1 -1
@@ -444,7 +444,7 @@ static int i2c_gpio_probe(struct platform_device *pdev)snprintf (adap->name,sizeof (adap->name),"i2c-gpio%d" , pdev->id); adap->algo_data = bit_data; - adap->class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + adap->class =I2C_CLASS_HWMON ; adap->dev.parent = dev;device_set_node (&adap->dev, fwnode);
PATCH 7/10 drivers/i2c/busses/i2c-mlxcpld.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/i2c/busses/i2c-mlxcpld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-mlxcpld.c +1 -1
@@ -477,7 +477,7 @@ static const struct i2c_adapter_quirks mlxcpld_i2c_quirks_ext2 = {static struct i2c_adapter mlxcpld_i2c_adapter = { .owner =THIS_MODULE , .name ="i2c-mlxcpld" , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &mlxcpld_i2c_algo, .quirks = &mlxcpld_i2c_quirks, .retries =MLXCPLD_I2C_RETR_NUM ,
PATCH 8/10 drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c +1 -1
@@ -289,7 +289,7 @@ static const struct i2c_algorithm netup_i2c_algorithm = {static const struct i2c_adapter netup_i2c_adapter = { .owner =THIS_MODULE , .name =NETUP_UNIDVB_NAME , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &netup_i2c_algorithm, };
PATCH 9/10 drivers/i2c/busses/scx200_acb.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/i2c/busses/scx200_acb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/scx200_acb.c +1 -1
@@ -427,7 +427,7 @@ static struct scx200_acb_iface *scx200_create_iface(const char *text,snprintf (adapter->name,sizeof (adapter->name),"%s ACB%d" , text, index); adapter->owner =THIS_MODULE ; adapter->algo = &scx200_acb_algorithm; - adapter->class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; + adapter->class =I2C_CLASS_HWMON ; adapter->dev.parent = dev;mutex_init (&iface->mutex);
PATCH 10/10 drivers/i2c/busses/i2c-ali1563.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitAfter removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term.
Series was created supported by Coccinelle and its splitpatch.
--- drivers/i2c/busses/i2c-ali1563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-ali1563.c +1 -1
@@ -390,7 +390,7 @@ static const struct i2c_algorithm ali1563_algorithm = {static struct i2c_adapter ali1563_adapter = { .owner =THIS_MODULE , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &ali1563_algorithm, };
Re: [PATCH 02/10] drivers/staging/greybus/i2c.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitQuoted 6 lines · Heiner Kallweit
After removal of the legacy eeprom driver the only remaining I2C client device driver supporting
I2C_CLASS_SPDis jc42. Because this driver also supportsI2C_CLASS_HWMON, adapters don't have to declare support forI2C_CLASS_SPDif they supportI2C_CLASS_HWMON. It's one step towards getting rid ofI2C_CLASS_SPDmid-term.
Quoted 7 lines
Series was created supported by Coccinelle and its splitpatch.
Signed-off-by Heiner Kallweit <[email protected]>--- drivers/staging/greybus/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Re: [PATCH 08/10] drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitQuoted 9 lines · Heiner Kallweit
After removal of the legacy eeprom driver the only remaining I2C client device driver supporting
I2C_CLASS_SPDis jc42. Because this driver also supportsI2C_CLASS_HWMON, adapters don't have to declare support forI2C_CLASS_SPDif they supportI2C_CLASS_HWMON. It's one step towards getting rid ofI2C_CLASS_SPDmid-term.Series was created supported by Coccinelle and its splitpatch.
Signed-off-by Heiner Kallweit <[email protected]>
As I want to apply this cleanup early in the cycle, could we have an ack for me to modify this subsystem, please?
Quoted 19 lines
--- drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c +1
-1@@ -289,7 +289,7 @@ static const struct i2c_algorithm netup_i2c_algorithm = {static const struct i2c_adapter netup_i2c_adapter = { .owner =THIS_MODULE , .name =NETUP_UNIDVB_NAME , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &netup_i2c_algorithm, };
Re: [PATCH 01/10] drivers/i2c/busses: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitQuoted 2 lines
Series was created supported by Coccinelle and its splitpatch.
I don't know splitpatch. However, I don't understand its result. Why isn't there one patch for all in drivers/i2c/busses? Also, the subject prefix should be plain "i2c: <do x for all drivers>" or something.
Re: [PATCH 01/10] drivers/i2c/busses: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
Quoted 7 lines · Wolfram Sang
Quoted 2 lines
Series was created supported by Coccinelle and its splitpatch.
I don't know splitpatch. However, I don't understand its result. Why isn't there one patch for all in
drivers/i2c/busses? Also, the subject prefix should be plain "i2c: <do x for all drivers>" or something.
AFAIK splitpatch uses get_maintainer.pl and creates one patch per maintainer(s). It's not smart enough to group changes per module. What I see is that the subject prefix often is based on personal preference of the subsystem maintainer, so far I don't see a rule. Therefore splitpatch seems to use the longest common part of file path's of grouped patches.
I'd appreciate hints on maybe better tools for creating patches for tree-wide changes. If possible I'd like to avoid having to manually split and adjust the patches.
Re: [PATCH 05/10] drivers/i2c/busses: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Heiner KallweitHi!
drivers/i2c/busses/i2c-kempld.c static const struct i2c_algorithm kempld_i2c_algorithm = { · line 287
Quoted 12 lines · Heiner Kallweit
drivers/i2c/busses/i2c-kempld.c +2
-2@@ -283,8 +283,8 @@ static const struct i2c_algorithm kempld_i2c_algorithm = {static const struct i2c_adapter kempld_i2c_adapter = { .owner =THIS_MODULE , .name ="i2c-kempld" , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD | -I2C_CLASS_DEPRECATED , + .class =I2C_CLASS_HWMON | +I2C_CLASS_DEPRECATED ,
The above is less than ideal...
It should obviously be:
- .class = I2C_CLASS_HWMON | I2C_CLASS_SPD |
- I2C_CLASS_DEPRECATED,
+ .class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED,
Cheers,
Peter
Re: [PATCH 05/10] drivers/i2c/busses: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
Quoted 21 lines · Peter Rosin
Hi!
drivers/i2c/busses/i2c-kempld.c static const struct i2c_algorithm kempld_i2c_algorithm = { · line 287
Quoted 12 lines · Heiner Kallweit
drivers/i2c/busses/i2c-kempld.c +2
-2@@ -283,8 +283,8 @@ static const struct i2c_algorithm kempld_i2c_algorithm = {static const struct i2c_adapter kempld_i2c_adapter = { .owner =THIS_MODULE , .name ="i2c-kempld" , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD | -I2C_CLASS_DEPRECATED , + .class =I2C_CLASS_HWMON | +I2C_CLASS_DEPRECATED ,The above is less than ideal...
It should obviously be:
drivers/i2c/busses/i2c-kempld.c static const struct i2c_algorithm kempld_i2c_algorithm = {
Quoted 3 lines
drivers/i2c/busses/i2c-kempld.c +1
-2- .class = I2C_CLASS_HWMON | I2C_CLASS_SPD | - I2C_CLASS_DEPRECATED, + .class = I2C_CLASS_HWMON | I2C_CLASS_DEPRECATED,
Sure. Thanks for the hint.
Quoted 2 lines
Cheers,
Peter
Re: [PATCH 08/10] drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON
In reply to Wolfram SangQuoted 7 lines · Wolfram Sang
Quoted 6 lines · Heiner Kallweit
After removal of the legacy eeprom driver the only remaining I2C client device driver supporting
I2C_CLASS_SPDis jc42. Because this driver also supportsI2C_CLASS_HWMON, adapters don't have to declare support forI2C_CLASS_SPDif they supportI2C_CLASS_HWMON. It's one step towards getting rid ofI2C_CLASS_SPDmid-term.
Quoted 7 lines
Quoted 3 lines
Series was created supported by Coccinelle and its splitpatch.
Signed-off-by Heiner Kallweit <[email protected]>As I want to apply this cleanup early in the cycle, could we have an ack for me to modify this subsystem, please?
Looking at the git history for this driver, there has been no sign of life from the official maintainers for years. Hopefully Mauro can ack this.
Quoted 19 lines
Quoted 19 lines
--- drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c +1
-1@@ -289,7 +289,7 @@ static const struct i2c_algorithm netup_i2c_algorithm = {static const struct i2c_adapter netup_i2c_adapter = { .owner =THIS_MODULE , .name =NETUP_UNIDVB_NAME , - .class =I2C_CLASS_HWMON |I2C_CLASS_SPD , + .class =I2C_CLASS_HWMON , .algo = &netup_i2c_algorithm, };