diff mbox series

[1/6] ASoC: fsl_ssi: Use of_device_get_match_data()

Message ID 20210118123815.1630882-1-festevam@gmail.com
State Accepted
Commit 9ce63203eb2071fe0117d2e2454c19d79af4a2f1
Headers show
Series [1/6] ASoC: fsl_ssi: Use of_device_get_match_data() | expand

Commit Message

Fabio Estevam Jan. 18, 2021, 12:38 p.m. UTC
The retrieval of driver data via of_device_get_match_data() can make
the code simpler.

Use of_device_get_match_data() to simplify the code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 sound/soc/fsl/fsl_ssi.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Mark Brown Jan. 21, 2021, 12:05 a.m. UTC | #1
On Mon, 18 Jan 2021 09:38:10 -0300, Fabio Estevam wrote:
> The retrieval of driver data via of_device_get_match_data() can make
> the code simpler.
> 
> Use of_device_get_match_data() to simplify the code.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/6] ASoC: fsl_ssi: Use of_device_get_match_data()
      commit: 9ce63203eb2071fe0117d2e2454c19d79af4a2f1
[2/6] ASoC: fsl_micfil: Use of_device_get_match_data()
      commit: d7388718d491463ed0fb7383a4c678b94fdda785
[3/6] ASoC: fsl_xcvr: Remove unused of_id variable
      commit: 42450175a3d21d0818976114833d23ca5035e713
[4/6] ASoC: fsl_asrc: Remove of_device_get_match_data() error check
      commit: 214172a9ca26f77c3d6912f97246dc6ec9b16141
[5/6] ASoC: fsl_esai: Remove of_device_get_match_data() error check
      commit: 1ccf6e6ef9261c0c8c0be495070c45c030adcc40
[6/6] ASoC: fsl_spdif: Remove of_device_get_match_data() error check
      commit: 4e63b56593e25937f22c01ae60574a3b0548553c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 404be27c15fe..db4ba5f22b77 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1397,18 +1397,11 @@  static int fsl_ssi_probe_from_dt(struct fsl_ssi *ssi)
 {
 	struct device *dev = ssi->dev;
 	struct device_node *np = dev->of_node;
-	const struct of_device_id *of_id;
 	const char *p, *sprop;
 	const __be32 *iprop;
 	u32 dmas[4];
 	int ret;
 
-	of_id = of_match_device(fsl_ssi_ids, dev);
-	if (!of_id || !of_id->data)
-		return -EINVAL;
-
-	ssi->soc = of_id->data;
-
 	ret = of_property_match_string(np, "clock-names", "ipg");
 	/* Get error code if not found */
 	ssi->has_ipg_clk_name = ret >= 0;
@@ -1492,6 +1485,7 @@  static int fsl_ssi_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	ssi->dev = dev;
+	ssi->soc = of_device_get_match_data(&pdev->dev);
 
 	/* Probe from DT */
 	ret = fsl_ssi_probe_from_dt(ssi);