http://bugzilla.opensuse.org/show_bug.cgi?id=1019316
http://bugzilla.opensuse.org/show_bug.cgi?id=1019316#c37
--- Comment #37 from Hans de Goede ---
Hi,
One remark about the patch, you know that you can set .driver_data in a
dmi_system_id table ? That would lead to somewhat cleaner code here IMHO,
Say:
static const struct dmi_system_id dmi_platform_table[] = {
{
.ident = "Intel Strago",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "Strago"),
},
.driver_data = &general_platform_data,
},
/* other entries from current dmi_platform_intel_braswell table with
.driver_data added */
{
.ident = "Chrome Buddy",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "Buddy"),
},
.driver_data = &buddy_platform_data,
},
{
.ident = "GPD Win",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "GPD-WINI55"),
},
.driver_data = &gpd_win_platform_data,
},
{ }
};
And then in probe():
const struct dmi_system_id *dmi_id;
dmi_id = dmi_first_match(dmi_platform_table);
if (dmi_id)
pdata = dmi_id->driver_data;
if (pdata)
rt5645->pdata = *pdata;
else if (rt5645_check_dp(&i2c->dev))
rt5645_parse_dt(rt5645, &i2c->dev);
And then from now on adding new dmi quirks will be much easier without needing
to touch probe() at all.
Regards,
Hans
--
You are receiving this mail because:
You are on the CC list for the bug.