Re: [PATCH v2 2/6] platform/x86: dell-smo8800: Move instantiation of lis3lv02d i2c_client from i2c-i801 to dell-smo8800

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+ Cc people from tags of 72921427d46b ("string.h: Add str_has_prefix() helper
function"). See below why.

On Sat, Jan 06, 2024 at 05:09:29PM +0100, Hans de Goede wrote:
> It is not necessary to handle the Dell specific instantiation of
> i2c_client-s for SMO8xxx ACPI devices without an ACPI I2cResource
> inside the generic i801 I2C adapter driver.
> 
> The kernel already instantiates platform_device-s for these ACPI devices
> and the drivers/platform/x86/dell/dell-smo8800.c driver binds to these
> platform drivers.
> 
> Move the i2c_client instantiation from the generic i2c-i801 driver to
> the Dell specific dell-smo8800 driver.

...

> +/*
> + * NOTE: If new models with FEATURE_IDF are added please also update
> + * i801_idf_ids[] in drivers/platform/x86/dell-smo8800.c
> + */
>  static const struct pci_device_id i801_ids[] = {

I believe this comment can be enforced with some defines / static_assert().
But I haven't given any thought about it, just an idea.

>  };

...

> + *  Copyright (C) 2023 Hans de Goede <hansg@xxxxxxxxxx>

2024?

...

> +	if (!strstarts(adap->name, "SMBus I801 adapter"))
> +		return 0;

Bah, we have str_has_prefix() and this, much older one...
Steven? Others? I mean we can do something about this duplication, right?

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux