Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1384590
| From | Octavian Purdila <octavian.purdila@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v2 05/10] i2c: add support for ACPI reconfigure notifications |
| Date | 2016-04-21 23:50 +0200 |
| Message-ID | <rquE2-7GS-13@gated-at.bofh.it> (permalink) |
| References | <rpMtk-61D-11@gated-at.bofh.it> <rpMD1-65k-31@gated-at.bofh.it> <rqukG-7zh-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Apr 22, 2016 at 12:27 AM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
Hi Andy and thanks for the review!
> On Wed, Apr 20, 2016 at 1:39 AM, Octavian Purdila
> <octavian.purdila@intel.com> wrote:
> > This patch adds supports for I2C device enumeration and removal via
> > ACPI reconfiguration notifications that are send as a result of an
> > ACPI table load or unload operation.
>
> >
> > acpi_dev_free_resource_list(&resource_list);
> >
> > + strlcpy(info->type, dev_name(&adev->dev), sizeof(info->type));
>
> strscpy() ?
That is the original code, I just moved it in a different function.
Its probably best if we use a separate patch for this, but is it worth
it?
>
> > +static int acpi_i2c_match_adapter(struct device *dev, void *data)
> > +{
> > + struct i2c_adapter *adapter = i2c_verify_adapter(dev);
> > +
> > + if (!adapter)
> > + return 0;
> > +
>
> > + return ACPI_HANDLE(dev) == (acpi_handle)data;
>
> What is suppose to return? Hidden bool to integer conversion is not
> best option I suppose.
>
per bus_find_device() :
* The callback should return 0 if the device doesn't match and
non-zero
* if it does. If the callback returns non-zero, this function will
* return to the caller and not iterate over any more devices.
*/
struct device *bus_find_device(struct bus_type *bus,
struct device *start, void *data,
int (*match)(struct device *dev, void *data))
> > +}
> > +
> > +static int acpi_i2c_match_device(struct device *dev, void *data)
> > +{
> > + return ACPI_COMPANION(dev) == data;
>
> Ditto.
>
> > +}
>
> --
> With Best Regards,
> Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH v2 00/10] ACPI overlays Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:40 +0200
[RFC PATCH v2 01/10] kernel: add TAINT_OVERLAY_ACPI_TABLE Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:40 +0200
[RFC PATCH v2 04/10] acpi: add support for ACPI reconfiguration notifiers Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:40 +0200
[RFC PATCH v2 07/10] efi: load SSTDs from EFI variables Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:50 +0200
[RFC PATCH v2 02/10] acpi: decouple initrd table install from CONFIG_ACPI_INITRD_TABLE_OVERRIDE Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:50 +0200
[RFC PATCH v2 09/10] acpi: add support for loading SSDTs via configfs Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:50 +0200
[RFC PATCH v2 06/10] spi: add support for ACPI reconfigure notifications Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:50 +0200
[RFC PATCH v2 08/10] acpi: add support for configfs Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:50 +0200
[RFC PATCH v2 05/10] i2c: add support for ACPI reconfigure notifications Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:50 +0200
Re: [RFC PATCH v2 05/10] i2c: add support for ACPI reconfigure notifications Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-04-21 23:30 +0200
Re: [RFC PATCH v2 05/10] i2c: add support for ACPI reconfigure notifications Octavian Purdila <octavian.purdila@intel.com> - 2016-04-21 23:50 +0200
[RFC PATCH v2 10/10] HACK: acpi: configfs: add unload_hanlde_path attribute for tables Octavian Purdila <octavian.purdila@intel.com> - 2016-04-20 00:50 +0200
csiph-web