Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1711442
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] platform/x86: intel_cht_int33fe: Work around BIOS bug on some devices |
| Date | 2017-08-14 22:50 +0200 |
| Message-ID | <ueutd-n0-33@gated-at.bofh.it> (permalink) |
| References | <ueu0a-dy-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 14, 2017 at 11:14 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> At least one BIOS enumerates the max17047 both through the INT33FE ACPI
> device (it is right there in the resources table) as well as through a
> separate MAX17047 device.
>
> This commit checks for the max17047 already being enumerated through
> a separate MAX17047 ACPI device and if so it uses the i2c-client
> instantiated for this and attaches the device-props for the max17047 to
> that i2c-client.
> +int cht_int33fe_check_for_max17047(struct device *dev, void *data)
> +{
> + const char *name = dev_name(dev);
> + struct i2c_client **max17047 = data;
> +
> + if (name && strcmp(name, "i2c-MAX17047:00") == 0) {
Can we stop using bad practice of comparing against _instance_?
If device is suppose to be single in the system, wouldn't _HID be enough?
> + *max17047 = to_i2c_client(dev);
> + return 1;
> + }
> +
> + return 0;
> +}
--
With Best Regards,
Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] platform/x86: intel_cht_int33fe: Work around BIOS bug on some devices Hans de Goede <hdegoede@redhat.com> - 2017-08-14 22:20 +0200
Re: [PATCH] platform/x86: intel_cht_int33fe: Work around BIOS bug on some devices Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-14 22:50 +0200
Re: [PATCH] platform/x86: intel_cht_int33fe: Work around BIOS bug on some devices Hans de Goede <hdegoede@redhat.com> - 2017-08-14 23:00 +0200
csiph-web