There is no machine is using aic32x4_pdata as platform_data, so
remove the dead code.
Cc: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
include/sound/tlv320aic32x4.h | 9 ---------
sound/soc/codecs/tlv320aic32x4.c | 9 +--------
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/include/sound/tlv320aic32x4.h b/include/sound/tlv320aic32x4.h
index 0abf74d7edbd69484c45ad6a1c39b3f67d61bd63..b779d671a99576deadc6e647edff9b1b3a5d33c2 100644
--- a/include/sound/tlv320aic32x4.h
+++ b/include/sound/tlv320aic32x4.h
@@ -40,13 +40,4 @@
struct aic32x4_setup_data {
unsigned int gpio_func[5];
};
-
-struct aic32x4_pdata {
- struct aic32x4_setup_data *setup;
- u32 power_cfg;
- u32 micpga_routing;
- bool swapdacs;
- int rstn_gpio;
-};
-
#endif
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 54ea4bc58c276d9ab39a15d312287dfb300dbab9..7dbcf7f7130b04a27f58f20beb83eb3676c79c3d 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -1346,7 +1346,6 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap,
enum aic32x4_type type)
{
struct aic32x4_priv *aic32x4;
- struct aic32x4_pdata *pdata = dev->platform_data;
struct device_node *np = dev->of_node;
int ret;
@@ -1363,13 +1362,7 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap,
dev_set_drvdata(dev, aic32x4);
- if (pdata) {
- aic32x4->power_cfg = pdata->power_cfg;
- aic32x4->swapdacs = pdata->swapdacs;
- aic32x4->micpga_routing = pdata->micpga_routing;
- aic32x4->rstn_gpio = pdata->rstn_gpio;
- aic32x4->mclk_name = "mclk";
- } else if (np) {
+ if (np) {
ret = aic32x4_parse_dt(aic32x4, np);
if (ret) {
dev_err(dev, "Failed to parse DT node\n");
--
2.37.1
Hi, Am Sonntag, 6. Juli 2025, 03:04:23 CEST schrieb Peng Fan: > There is no machine is using aic32x4_pdata as platform_data, so > remove the dead code. > > Cc: Markus Niebel <Markus.Niebel@ew.tq-group.com> > Cc: Alexander Stein <alexander.stein@ew.tq-group.com> > Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com> > --- > include/sound/tlv320aic32x4.h | 9 --------- > sound/soc/codecs/tlv320aic32x4.c | 9 +-------- > 2 files changed, 1 insertion(+), 17 deletions(-) > > diff --git a/include/sound/tlv320aic32x4.h b/include/sound/tlv320aic32x4.h > index 0abf74d7edbd69484c45ad6a1c39b3f67d61bd63..b779d671a99576deadc6e647edff9b1b3a5d33c2 100644 > --- a/include/sound/tlv320aic32x4.h > +++ b/include/sound/tlv320aic32x4.h > @@ -40,13 +40,4 @@ > struct aic32x4_setup_data { > unsigned int gpio_func[5]; > }; > - > -struct aic32x4_pdata { > - struct aic32x4_setup_data *setup; > - u32 power_cfg; > - u32 micpga_routing; > - bool swapdacs; > - int rstn_gpio; > -}; > - > #endif > diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c > index 54ea4bc58c276d9ab39a15d312287dfb300dbab9..7dbcf7f7130b04a27f58f20beb83eb3676c79c3d 100644 > --- a/sound/soc/codecs/tlv320aic32x4.c > +++ b/sound/soc/codecs/tlv320aic32x4.c > @@ -1346,7 +1346,6 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap, > enum aic32x4_type type) > { > struct aic32x4_priv *aic32x4; > - struct aic32x4_pdata *pdata = dev->platform_data; > struct device_node *np = dev->of_node; > int ret; > > @@ -1363,13 +1362,7 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap, > > dev_set_drvdata(dev, aic32x4); > > - if (pdata) { > - aic32x4->power_cfg = pdata->power_cfg; > - aic32x4->swapdacs = pdata->swapdacs; > - aic32x4->micpga_routing = pdata->micpga_routing; > - aic32x4->rstn_gpio = pdata->rstn_gpio; > - aic32x4->mclk_name = "mclk"; > - } else if (np) { > + if (np) { > ret = aic32x4_parse_dt(aic32x4, np); > if (ret) { > dev_err(dev, "Failed to parse DT node\n"); > > -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider http://www.tq-group.com/
© 2016 - 2025 Red Hat, Inc.