]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: arm: pxa2xx: remove platform_data processing
authorArnd Bergmann <arnd@arndb.de>
Tue, 5 May 2026 20:24:24 +0000 (22:24 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 6 May 2026 01:14:42 +0000 (10:14 +0900)
Nothing ever sets pxa2xx_audio_ops_t since the last users were removed
in ce79f3a1ad5f ("ARM: pxa: prune unused device support") , so stop
passing it around through the sound, ac97 code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260505202426.3605262-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/platform_data/asoc-pxa.h
include/sound/ac97/codec.h
include/sound/ac97/controller.h
sound/ac97/bus.c
sound/soc/pxa/pxa2xx-ac97.c

index 7b5b9e20fbf5e616ab5c44106d0c960c6c20161e..7df78867db490859aebba2e8f34a14b267703e04 100644 (file)
@@ -6,27 +6,6 @@
 #include <sound/pcm.h>
 #include <sound/ac97_codec.h>
 
-/*
- * @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95)
- *              a -1 value means no gpio will be used for reset
- * @codec_pdata: AC97 codec platform_data
-
- * reset_gpio should only be specified for pxa27x CPUs where a silicon
- * bug prevents correct operation of the reset line. If not specified,
- * the default behaviour on these CPUs is to consider gpio 113 as the
- * AC97 reset line, which is the default on most boards.
- */
-typedef struct {
-       int (*startup)(struct snd_pcm_substream *, void *);
-       void (*shutdown)(struct snd_pcm_substream *, void *);
-       void (*suspend)(void *);
-       void (*resume)(void *);
-       void *priv;
-       int reset_gpio;
-       void *codec_pdata[AC97_BUS_MAX_DEVICES];
-} pxa2xx_audio_ops_t;
-
-extern void pxa_set_ac97_info(pxa2xx_audio_ops_t *ops);
 extern void pxa27x_configure_ac97reset(int reset_gpio, bool to_gpio);
 
 #endif
index 882b849b9255e2c40a9917a4e047c2bf2cba1899..69b404c354f5015213c9788b8de75452fbea03b5 100644 (file)
@@ -108,6 +108,9 @@ static inline void ac97_set_drvdata(struct ac97_codec_device *adev,
        dev_set_drvdata(ac97_codec_dev2dev(adev), data);
 }
 
-void *snd_ac97_codec_get_platdata(const struct ac97_codec_device *adev);
+static inline void *snd_ac97_codec_get_platdata(const struct ac97_codec_device *adev)
+{
+       return NULL;
+}
 
 #endif
index 06b5afb7fa6b9fedfd997a1e87634012470ce9c4..d5895ea3922bdeee4d98099bc90903c6e03d4951 100644 (file)
@@ -62,14 +62,13 @@ struct ac97_controller_ops {
 #if IS_ENABLED(CONFIG_AC97_BUS_NEW)
 struct ac97_controller *snd_ac97_controller_register(
        const struct ac97_controller_ops *ops, struct device *dev,
-       unsigned short slots_available, void **codecs_pdata);
+       unsigned short slots_available);
 void snd_ac97_controller_unregister(struct ac97_controller *ac97_ctrl);
 #else
 static inline struct ac97_controller *
 snd_ac97_controller_register(const struct ac97_controller_ops *ops,
                             struct device *dev,
-                            unsigned short slots_available,
-                            void **codecs_pdata)
+                            unsigned short slots_available)
 {
        return ERR_PTR(-ENODEV);
 }
index 15487837e89466ec0ecaa1861cef34a6e82eb6f2..a4d230a19c563fa2c9904889f8bb4ca6a334ca0f 100644 (file)
@@ -206,24 +206,6 @@ void snd_ac97_codec_driver_unregister(struct ac97_codec_driver *drv)
 }
 EXPORT_SYMBOL_GPL(snd_ac97_codec_driver_unregister);
 
-/**
- * snd_ac97_codec_get_platdata - get platform_data
- * @adev: the ac97 codec device
- *
- * For legacy platforms, in order to have platform_data in codec drivers
- * available, while ac97 device are auto-created upon probe, this retrieves the
- * platdata which was setup on ac97 controller registration.
- *
- * Returns the platform data pointer
- */
-void *snd_ac97_codec_get_platdata(const struct ac97_codec_device *adev)
-{
-       struct ac97_controller *ac97_ctrl = adev->ac97_ctrl;
-
-       return ac97_ctrl->codecs_pdata[adev->num];
-}
-EXPORT_SYMBOL_GPL(snd_ac97_codec_get_platdata);
-
 static void ac97_ctrl_codecs_unregister(struct ac97_controller *ac97_ctrl)
 {
        int i;
@@ -337,7 +319,6 @@ static int ac97_add_adapter(struct ac97_controller *ac97_ctrl)
  * @dev: the device providing the ac97 DC function
  * @slots_available: mask of the ac97 codecs that can be scanned and probed
  *                   bit0 => codec 0, bit1 => codec 1 ... bit 3 => codec 3
- * @codecs_pdata: codec platform data
  *
  * Register a digital controller which can control up to 4 ac97 codecs. This is
  * the controller side of the AC97 AC-link, while the slave side are the codecs.
@@ -346,18 +327,15 @@ static int ac97_add_adapter(struct ac97_controller *ac97_ctrl)
  */
 struct ac97_controller *snd_ac97_controller_register(
        const struct ac97_controller_ops *ops, struct device *dev,
-       unsigned short slots_available, void **codecs_pdata)
+       unsigned short slots_available)
 {
        struct ac97_controller *ac97_ctrl;
-       int ret, i;
+       int ret;
 
        ac97_ctrl = kzalloc_obj(*ac97_ctrl);
        if (!ac97_ctrl)
                return ERR_PTR(-ENOMEM);
 
-       for (i = 0; i < AC97_BUS_MAX_CODECS && codecs_pdata; i++)
-               ac97_ctrl->codecs_pdata[i] = codecs_pdata[i];
-
        ac97_ctrl->ops = ops;
        ac97_ctrl->slots_available = slots_available;
        ac97_ctrl->parent = dev;
index a0c672602918678b7f065bc01e9feaeba4064ccb..b0b1293bc8497e51e6b702ef531d76091eeefef1 100644 (file)
@@ -246,8 +246,7 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
        }
 
        ctrl = snd_ac97_controller_register(&pxa2xx_ac97_ops, &pdev->dev,
-                                           AC97_SLOTS_AVAILABLE_ALL,
-                                           NULL);
+                                           AC97_SLOTS_AVAILABLE_ALL);
        if (IS_ERR(ctrl))
                return PTR_ERR(ctrl);