diff mbox series

eeprom at24: Remove unnecessary AT24_CHIP_DATA for INT3499

Message ID 20190217115352.9540-1-bunk@kernel.org
State Accepted
Delegated to: Bartosz Golaszewski
Headers show
Series eeprom at24: Remove unnecessary AT24_CHIP_DATA for INT3499 | expand

Commit Message

Adrian Bunk Feb. 17, 2019, 11:53 a.m. UTC
Specifying AT24_DEVICE_MAGIC for INT3499 was necessary before
commit b680f4fa74496 (eeprom: at24: convert magic numbers to structs),
but now at24_data_24c08 can be used.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
 drivers/misc/eeprom/at24.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Bartosz Golaszewski Feb. 18, 2019, 8:05 a.m. UTC | #1
niedz., 17 lut 2019 o 12:53 Adrian Bunk <bunk@kernel.org> napisaƂ(a):
>
> Specifying AT24_DEVICE_MAGIC for INT3499 was necessary before
> commit b680f4fa74496 (eeprom: at24: convert magic numbers to structs),
> but now at24_data_24c08 can be used.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
> ---
>  drivers/misc/eeprom/at24.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index ddfcf4ade7bf..8e5fa41ac98d 100644
> --- a/drivers/misc/eeprom/at24.c
> +++ b/drivers/misc/eeprom/at24.c
> @@ -157,8 +157,6 @@ AT24_CHIP_DATA(at24_data_24c256, 262144 / 8, AT24_FLAG_ADDR16);
>  AT24_CHIP_DATA(at24_data_24c512, 524288 / 8, AT24_FLAG_ADDR16);
>  AT24_CHIP_DATA(at24_data_24c1024, 1048576 / 8, AT24_FLAG_ADDR16);
>  AT24_CHIP_DATA(at24_data_24c2048, 2097152 / 8, AT24_FLAG_ADDR16);
> -/* identical to 24c08 ? */
> -AT24_CHIP_DATA(at24_data_INT3499, 8192 / 8, 0);
>
>  static const struct i2c_device_id at24_ids[] = {
>         { "24c00",      (kernel_ulong_t)&at24_data_24c00 },
> @@ -218,7 +216,7 @@ static const struct of_device_id at24_of_match[] = {
>  MODULE_DEVICE_TABLE(of, at24_of_match);
>
>  static const struct acpi_device_id at24_acpi_ids[] = {
> -       { "INT3499",    (kernel_ulong_t)&at24_data_INT3499 },
> +       { "INT3499",    (kernel_ulong_t)&at24_data_24c08 },
>         { /* END OF LIST */ }
>  };
>  MODULE_DEVICE_TABLE(acpi, at24_acpi_ids);
> --
> 2.11.0
>

I've already sent my pull-request for v5.1, so I'll pick it up for
v5.2 after the merge window.

Thanks,
Bartosz Golaszewski
Andy Shevchenko Feb. 18, 2019, 10:59 a.m. UTC | #2
On Sun, Feb 17, 2019 at 01:53:52PM +0200, Adrian Bunk wrote:
> Specifying AT24_DEVICE_MAGIC for INT3499 was necessary before
> commit b680f4fa74496 (eeprom: at24: convert magic numbers to structs),
> but now at24_data_24c08 can be used.
> 

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

To be clear, this can be anything in general (but okay, we have old ACPI tables
where there nothing hints us about size), the properly organized ACPI table
should have "size" property inside _DSD.

> Signed-off-by: Adrian Bunk <bunk@kernel.org>
> ---
>  drivers/misc/eeprom/at24.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index ddfcf4ade7bf..8e5fa41ac98d 100644
> --- a/drivers/misc/eeprom/at24.c
> +++ b/drivers/misc/eeprom/at24.c
> @@ -157,8 +157,6 @@ AT24_CHIP_DATA(at24_data_24c256, 262144 / 8, AT24_FLAG_ADDR16);
>  AT24_CHIP_DATA(at24_data_24c512, 524288 / 8, AT24_FLAG_ADDR16);
>  AT24_CHIP_DATA(at24_data_24c1024, 1048576 / 8, AT24_FLAG_ADDR16);
>  AT24_CHIP_DATA(at24_data_24c2048, 2097152 / 8, AT24_FLAG_ADDR16);
> -/* identical to 24c08 ? */
> -AT24_CHIP_DATA(at24_data_INT3499, 8192 / 8, 0);
>  
>  static const struct i2c_device_id at24_ids[] = {
>  	{ "24c00",	(kernel_ulong_t)&at24_data_24c00 },
> @@ -218,7 +216,7 @@ static const struct of_device_id at24_of_match[] = {
>  MODULE_DEVICE_TABLE(of, at24_of_match);
>  
>  static const struct acpi_device_id at24_acpi_ids[] = {
> -	{ "INT3499",	(kernel_ulong_t)&at24_data_INT3499 },
> +	{ "INT3499",	(kernel_ulong_t)&at24_data_24c08 },
>  	{ /* END OF LIST */ }
>  };
>  MODULE_DEVICE_TABLE(acpi, at24_acpi_ids);
> -- 
> 2.11.0
>
diff mbox series

Patch

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index ddfcf4ade7bf..8e5fa41ac98d 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -157,8 +157,6 @@  AT24_CHIP_DATA(at24_data_24c256, 262144 / 8, AT24_FLAG_ADDR16);
 AT24_CHIP_DATA(at24_data_24c512, 524288 / 8, AT24_FLAG_ADDR16);
 AT24_CHIP_DATA(at24_data_24c1024, 1048576 / 8, AT24_FLAG_ADDR16);
 AT24_CHIP_DATA(at24_data_24c2048, 2097152 / 8, AT24_FLAG_ADDR16);
-/* identical to 24c08 ? */
-AT24_CHIP_DATA(at24_data_INT3499, 8192 / 8, 0);
 
 static const struct i2c_device_id at24_ids[] = {
 	{ "24c00",	(kernel_ulong_t)&at24_data_24c00 },
@@ -218,7 +216,7 @@  static const struct of_device_id at24_of_match[] = {
 MODULE_DEVICE_TABLE(of, at24_of_match);
 
 static const struct acpi_device_id at24_acpi_ids[] = {
-	{ "INT3499",	(kernel_ulong_t)&at24_data_INT3499 },
+	{ "INT3499",	(kernel_ulong_t)&at24_data_24c08 },
 	{ /* END OF LIST */ }
 };
 MODULE_DEVICE_TABLE(acpi, at24_acpi_ids);