Loading sound/soc/codecs/max98090.c +26 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/pm_runtime.h> #include <linux/regmap.h> #include <linux/slab.h> #include <linux/acpi.h> #include <sound/jack.h> #include <sound/pcm.h> #include <sound/pcm_params.h> Loading Loading @@ -2329,9 +2330,11 @@ static const struct regmap_config max98090_regmap = { }; static int max98090_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) const struct i2c_device_id *i2c_id) { struct max98090_priv *max98090; const struct acpi_device_id *acpi_id; kernel_ulong_t driver_data = 0; int ret; pr_debug("max98090_i2c_probe\n"); Loading @@ -2341,7 +2344,19 @@ static int max98090_i2c_probe(struct i2c_client *i2c, if (max98090 == NULL) return -ENOMEM; max98090->devtype = id->driver_data; if (ACPI_HANDLE(&i2c->dev)) { acpi_id = acpi_match_device(i2c->dev.driver->acpi_match_table, &i2c->dev); if (!acpi_id) { dev_err(&i2c->dev, "No driver data\n"); return -EINVAL; } driver_data = acpi_id->driver_data; } else if (i2c_id) { driver_data = i2c_id->driver_data; } max98090->devtype = driver_data; i2c_set_clientdata(i2c, max98090); max98090->pdata = i2c->dev.platform_data; max98090->irq = i2c->irq; Loading Loading @@ -2405,12 +2420,21 @@ static const struct of_device_id max98090_of_match[] = { }; MODULE_DEVICE_TABLE(of, max98090_of_match); #ifdef CONFIG_ACPI static struct acpi_device_id max98090_acpi_match[] = { { "193C9890", MAX98090 }, { } }; MODULE_DEVICE_TABLE(acpi, max98090_acpi_match); #endif static struct i2c_driver max98090_i2c_driver = { .driver = { .name = "max98090", .owner = THIS_MODULE, .pm = &max98090_pm, .of_match_table = of_match_ptr(max98090_of_match), .acpi_match_table = ACPI_PTR(max98090_acpi_match), }, .probe = max98090_i2c_probe, .remove = max98090_i2c_remove, Loading Loading
sound/soc/codecs/max98090.c +26 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/pm_runtime.h> #include <linux/regmap.h> #include <linux/slab.h> #include <linux/acpi.h> #include <sound/jack.h> #include <sound/pcm.h> #include <sound/pcm_params.h> Loading Loading @@ -2329,9 +2330,11 @@ static const struct regmap_config max98090_regmap = { }; static int max98090_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) const struct i2c_device_id *i2c_id) { struct max98090_priv *max98090; const struct acpi_device_id *acpi_id; kernel_ulong_t driver_data = 0; int ret; pr_debug("max98090_i2c_probe\n"); Loading @@ -2341,7 +2344,19 @@ static int max98090_i2c_probe(struct i2c_client *i2c, if (max98090 == NULL) return -ENOMEM; max98090->devtype = id->driver_data; if (ACPI_HANDLE(&i2c->dev)) { acpi_id = acpi_match_device(i2c->dev.driver->acpi_match_table, &i2c->dev); if (!acpi_id) { dev_err(&i2c->dev, "No driver data\n"); return -EINVAL; } driver_data = acpi_id->driver_data; } else if (i2c_id) { driver_data = i2c_id->driver_data; } max98090->devtype = driver_data; i2c_set_clientdata(i2c, max98090); max98090->pdata = i2c->dev.platform_data; max98090->irq = i2c->irq; Loading Loading @@ -2405,12 +2420,21 @@ static const struct of_device_id max98090_of_match[] = { }; MODULE_DEVICE_TABLE(of, max98090_of_match); #ifdef CONFIG_ACPI static struct acpi_device_id max98090_acpi_match[] = { { "193C9890", MAX98090 }, { } }; MODULE_DEVICE_TABLE(acpi, max98090_acpi_match); #endif static struct i2c_driver max98090_i2c_driver = { .driver = { .name = "max98090", .owner = THIS_MODULE, .pm = &max98090_pm, .of_match_table = of_match_ptr(max98090_of_match), .acpi_match_table = ACPI_PTR(max98090_acpi_match), }, .probe = max98090_i2c_probe, .remove = max98090_i2c_remove, Loading