24 Apr
2015
24 Apr
'15
1:12 p.m.
On Thu, Apr 23, 2015 at 04:35:18PM -0700, yang.a.fang@intel.com wrote:
+static int strago_quirk_cb(const struct dmi_system_id *id) +{
- struct rt5645_priv **rt5645;
- rt5645 = (struct rt5645_priv **)id->driver_data;
- if (*rt5645) {
(*rt5645)->pdata.dmic_en = 1;
(*rt5645)->pdata.dmic1_data_pin = -1;
(*rt5645)->pdata.dmic2_data_pin = RT5645_DMIC_DATA_IN2P;
(*rt5645)->pdata.en_jd_func = 1;
(*rt5645)->pdata.jd_mode = 3;
- }
- return 1;
+}
This doesn't look good - we're modifying the driver data which should really be global static data. I'd expect us to be doing something like return a pointer to the platform data for the device, not modify things in place.