Loading sound/soc/codecs/cq93vc.c +6 −4 Original line number Diff line number Diff line Loading @@ -121,17 +121,19 @@ static struct snd_soc_dai_driver cq93vc_dai = { .ops = &cq93vc_dai_ops, }; static struct regmap *cq93vc_get_regmap(struct device *dev) static int cq93vc_probe(struct snd_soc_component *component) { struct davinci_vc *davinci_vc = dev->platform_data; struct davinci_vc *davinci_vc = component->dev->platform_data; return davinci_vc->regmap; snd_soc_component_init_regmap(component, davinci_vc->regmap); return 0; } static const struct snd_soc_codec_driver soc_codec_dev_cq93vc = { .set_bias_level = cq93vc_set_bias_level, .get_regmap = cq93vc_get_regmap, .component_driver = { .probe = cq93vc_probe, .controls = cq93vc_snd_controls, .num_controls = ARRAY_SIZE(cq93vc_snd_controls), }, Loading sound/soc/codecs/cs35l32.c +6 −12 Original line number Diff line number Diff line Loading @@ -355,13 +355,9 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client, unsigned int devid = 0; unsigned int reg; cs35l32 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l32_private), GFP_KERNEL); if (!cs35l32) { dev_err(&i2c_client->dev, "could not allocate codec\n"); cs35l32 = devm_kzalloc(&i2c_client->dev, sizeof(*cs35l32), GFP_KERNEL); if (!cs35l32) return -ENOMEM; } i2c_set_clientdata(i2c_client, cs35l32); Loading @@ -375,13 +371,11 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client, if (pdata) { cs35l32->pdata = *pdata; } else { pdata = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l32_platform_data), pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) { dev_err(&i2c_client->dev, "could not allocate pdata\n"); if (!pdata) return -ENOMEM; } if (i2c_client->dev.of_node) { ret = cs35l32_handle_of_data(i2c_client, &cs35l32->pdata); Loading sound/soc/codecs/cs35l34.c +6 −13 Original line number Diff line number Diff line Loading @@ -1004,13 +1004,9 @@ static int cs35l34_i2c_probe(struct i2c_client *i2c_client, unsigned int devid = 0; unsigned int reg; cs35l34 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l34_private), GFP_KERNEL); if (!cs35l34) { dev_err(&i2c_client->dev, "could not allocate codec\n"); cs35l34 = devm_kzalloc(&i2c_client->dev, sizeof(*cs35l34), GFP_KERNEL); if (!cs35l34) return -ENOMEM; } i2c_set_clientdata(i2c_client, cs35l34); cs35l34->regmap = devm_regmap_init_i2c(i2c_client, &cs35l34_regmap); Loading Loading @@ -1044,14 +1040,11 @@ static int cs35l34_i2c_probe(struct i2c_client *i2c_client, if (pdata) { cs35l34->pdata = *pdata; } else { pdata = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l34_platform_data), pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) { dev_err(&i2c_client->dev, "could not allocate pdata\n"); if (!pdata) return -ENOMEM; } if (i2c_client->dev.of_node) { ret = cs35l34_handle_of_data(i2c_client, pdata); if (ret != 0) Loading sound/soc/codecs/cs42l52.c +5 −8 Original line number Diff line number Diff line Loading @@ -1100,8 +1100,7 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client, unsigned int reg; u32 val32; cs42l52 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l52_private), GFP_KERNEL); cs42l52 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l52), GFP_KERNEL); if (cs42l52 == NULL) return -ENOMEM; cs42l52->dev = &i2c_client->dev; Loading @@ -1115,13 +1114,11 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client, if (pdata) { cs42l52->pdata = *pdata; } else { pdata = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l52_platform_data), pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) { dev_err(&i2c_client->dev, "could not allocate pdata\n"); if (!pdata) return -ENOMEM; } if (i2c_client->dev.of_node) { if (of_property_read_bool(i2c_client->dev.of_node, "cirrus,mica-differential-cfg")) Loading Loading
sound/soc/codecs/cq93vc.c +6 −4 Original line number Diff line number Diff line Loading @@ -121,17 +121,19 @@ static struct snd_soc_dai_driver cq93vc_dai = { .ops = &cq93vc_dai_ops, }; static struct regmap *cq93vc_get_regmap(struct device *dev) static int cq93vc_probe(struct snd_soc_component *component) { struct davinci_vc *davinci_vc = dev->platform_data; struct davinci_vc *davinci_vc = component->dev->platform_data; return davinci_vc->regmap; snd_soc_component_init_regmap(component, davinci_vc->regmap); return 0; } static const struct snd_soc_codec_driver soc_codec_dev_cq93vc = { .set_bias_level = cq93vc_set_bias_level, .get_regmap = cq93vc_get_regmap, .component_driver = { .probe = cq93vc_probe, .controls = cq93vc_snd_controls, .num_controls = ARRAY_SIZE(cq93vc_snd_controls), }, Loading
sound/soc/codecs/cs35l32.c +6 −12 Original line number Diff line number Diff line Loading @@ -355,13 +355,9 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client, unsigned int devid = 0; unsigned int reg; cs35l32 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l32_private), GFP_KERNEL); if (!cs35l32) { dev_err(&i2c_client->dev, "could not allocate codec\n"); cs35l32 = devm_kzalloc(&i2c_client->dev, sizeof(*cs35l32), GFP_KERNEL); if (!cs35l32) return -ENOMEM; } i2c_set_clientdata(i2c_client, cs35l32); Loading @@ -375,13 +371,11 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client, if (pdata) { cs35l32->pdata = *pdata; } else { pdata = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l32_platform_data), pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) { dev_err(&i2c_client->dev, "could not allocate pdata\n"); if (!pdata) return -ENOMEM; } if (i2c_client->dev.of_node) { ret = cs35l32_handle_of_data(i2c_client, &cs35l32->pdata); Loading
sound/soc/codecs/cs35l34.c +6 −13 Original line number Diff line number Diff line Loading @@ -1004,13 +1004,9 @@ static int cs35l34_i2c_probe(struct i2c_client *i2c_client, unsigned int devid = 0; unsigned int reg; cs35l34 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l34_private), GFP_KERNEL); if (!cs35l34) { dev_err(&i2c_client->dev, "could not allocate codec\n"); cs35l34 = devm_kzalloc(&i2c_client->dev, sizeof(*cs35l34), GFP_KERNEL); if (!cs35l34) return -ENOMEM; } i2c_set_clientdata(i2c_client, cs35l34); cs35l34->regmap = devm_regmap_init_i2c(i2c_client, &cs35l34_regmap); Loading Loading @@ -1044,14 +1040,11 @@ static int cs35l34_i2c_probe(struct i2c_client *i2c_client, if (pdata) { cs35l34->pdata = *pdata; } else { pdata = devm_kzalloc(&i2c_client->dev, sizeof(struct cs35l34_platform_data), pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) { dev_err(&i2c_client->dev, "could not allocate pdata\n"); if (!pdata) return -ENOMEM; } if (i2c_client->dev.of_node) { ret = cs35l34_handle_of_data(i2c_client, pdata); if (ret != 0) Loading
sound/soc/codecs/cs42l52.c +5 −8 Original line number Diff line number Diff line Loading @@ -1100,8 +1100,7 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client, unsigned int reg; u32 val32; cs42l52 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l52_private), GFP_KERNEL); cs42l52 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l52), GFP_KERNEL); if (cs42l52 == NULL) return -ENOMEM; cs42l52->dev = &i2c_client->dev; Loading @@ -1115,13 +1114,11 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client, if (pdata) { cs42l52->pdata = *pdata; } else { pdata = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l52_platform_data), pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) { dev_err(&i2c_client->dev, "could not allocate pdata\n"); if (!pdata) return -ENOMEM; } if (i2c_client->dev.of_node) { if (of_property_read_bool(i2c_client->dev.of_node, "cirrus,mica-differential-cfg")) Loading