lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 29 Sep 2012 13:31:52 +0000 From: "Zhang, Rui" <rui.zhang@...el.com> To: Mika Westerberg <mika.westerberg@...ux.intel.com> CC: LKML <linux-kernel@...r.kernel.org>, linux-pm <linux-pm@...ts.linux-foundation.org>, linux-i2c <linux-i2c@...r.kernel.org>, "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>, "Len, Brown" <lenb@...nel.org>, "Rafael J. Wysocki" <rjw@...k.pl>, Grant Likely <grant.likely@...retlab.ca>, Dirk Brandewie <dirk.brandewie@...il.com> Subject: RE: [RFC PATCH 1/6] Introduce acpi_match_device_id(). > -----Original Message----- > From: Mika Westerberg [mailto:mika.westerberg@...ux.intel.com] > Sent: Friday, September 28, 2012 10:14 PM > To: Zhang, Rui > Cc: LKML; linux-pm; linux-i2c; linux-acpi@...r.kernel.org; Len, Brown; > Rafael J. Wysocki; Grant Likely; Dirk Brandewie > Subject: Re: [RFC PATCH 1/6] Introduce acpi_match_device_id(). > Importance: High > > On Fri, Sep 28, 2012 at 03:38:30PM +0800, Zhang Rui wrote: > > >From 72df5d1f51fb27a4ba7f70a3b07df759d32b8288 Mon Sep 17 00:00:00 > > >2001 > > From: Zhang Rui <rui.zhang@...el.com> > > Date: Thu, 27 Sep 2012 15:11:55 +0800 > > Subject: [RFC PATCH 1/6] Introduce acpi_match_device_id(). > > > > This API is used to check if a device id string is compatible with an > > ACPI device, either PNP id exported via _HID or compatible ids > > exported via _CID control method. > > > > Signed-off-by: Zhang Rui <rui.zhang@...el.com> > > --- > > drivers/acpi/scan.c | 22 ++++++++++++++++++++++ > > include/acpi/acpi_bus.h | 6 ++++++ > > 2 files changed, 28 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index > > d1ecca2..936a7c9 100644 > > --- a/drivers/acpi/scan.c > > +++ b/drivers/acpi/scan.c > > @@ -312,6 +312,28 @@ int acpi_match_device_ids(struct acpi_device > > *device, } EXPORT_SYMBOL(acpi_match_device_ids); > > > > +int acpi_match_device_id(const struct device *dev, const char *id) > > Would be good idea to implement this in terms of of_match_device() so > that it returns pointer to the matched id. This way drivers can get the > ->driver_data pretty easily if needed. > Good idea. Will do that in v2. > > +{ > > + acpi_handle handle = DEVICE_ACPI_HANDLE(dev); > > If the device is not bound to an ACPI handle this will return NULL. And > I don't see you doing that in this series meaning that.. > You're right, I should set pdev->archdata.acpi_handle to the I2C controller in i2c_root.c. Thanks, rui -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists