Messages in this thread |  | | From | "Rafael J. Wysocki" <> | Subject | Re: [PATCH 4/4] ACPI / platform: Use struct acpi_scan_handler for creating devices | Date | Tue, 29 Jan 2013 13:02:37 +0100 |
| |
On Tuesday, January 29, 2013 10:05:09 AM Mika Westerberg wrote: > On Mon, Jan 28, 2013 at 02:01:14PM +0100, Rafael J. Wysocki wrote: > > +/* Flags for acpi_create_platform_device */ > > +#define ACPI_PLATFORM_CLK BIT(0) > > + > > +/* > > + * The following ACPI IDs are known to be suitable for representing as > > + * platform devices. > > + */ > > +static const struct acpi_device_id acpi_platform_device_ids[] = { > > + > > + { "PNP0D40" }, > > + > > + /* Haswell LPSS devices */ > > + { "INT33C0", ACPI_PLATFORM_CLK }, > > + { "INT33C1", ACPI_PLATFORM_CLK }, > > + { "INT33C2", ACPI_PLATFORM_CLK }, > > + { "INT33C3", ACPI_PLATFORM_CLK }, > > + { "INT33C4", ACPI_PLATFORM_CLK }, > > + { "INT33C5", ACPI_PLATFORM_CLK }, > > + { "INT33C6", ACPI_PLATFORM_CLK }, > > + { "INT33C7", ACPI_PLATFORM_CLK }, > > + > > + { } > > +}; > > Now that we have everything the platform support code needs in a single > file, should we instead of setting flags and comparing strings like > "INT33C" to find out are we running on Lynxpoint, pass function pointer > that gets called when corresponding device gets created? Something like: > > { "INT33C0", lpt_clks_init }, > ... > > Or do you think we need to keep the flags still? > > I can prepare a patch if this turns out to be sensible thing to do.
Well, if we can reduce the code size this way, please send a patch.
Thanks, Rafael
-- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
|  |