diff options
Diffstat (limited to 'sound/soc/fsl/imx-audmux.c')
| -rw-r--r-- | sound/soc/fsl/imx-audmux.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index be003a117b39..f8335a04595a 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -13,7 +13,6 @@ #include <linux/io.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/slab.h> @@ -238,7 +237,7 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev, child); continue; } - if (!of_property_read_bool(child, "fsl,port-config")) { + if (!of_property_present(child, "fsl,port-config")) { dev_warn(&pdev->dev, "child node \"%pOF\" does not have property fsl,port-config\n", child); continue; @@ -306,7 +305,7 @@ static int imx_audmux_probe(struct platform_device *pdev) return -EINVAL; } - regcache = devm_kzalloc(&pdev->dev, sizeof(u32) * reg_max, GFP_KERNEL); + regcache = devm_kcalloc(&pdev->dev, reg_max, sizeof(u32), GFP_KERNEL); if (!regcache) return -ENOMEM; @@ -321,7 +320,6 @@ static void imx_audmux_remove(struct platform_device *pdev) audmux_debugfs_remove(); } -#ifdef CONFIG_PM_SLEEP static int imx_audmux_suspend(struct device *dev) { int i; @@ -349,18 +347,17 @@ static int imx_audmux_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops imx_audmux_pm = { - SET_SYSTEM_SLEEP_PM_OPS(imx_audmux_suspend, imx_audmux_resume) + SYSTEM_SLEEP_PM_OPS(imx_audmux_suspend, imx_audmux_resume) }; static struct platform_driver imx_audmux_driver = { .probe = imx_audmux_probe, - .remove_new = imx_audmux_remove, + .remove = imx_audmux_remove, .driver = { .name = DRIVER_NAME, - .pm = &imx_audmux_pm, + .pm = pm_sleep_ptr(&imx_audmux_pm), .of_match_table = imx_audmux_dt_ids, } }; |
