/* * phycore-ac97.c -- SoC audio for imx_phycore in AC97 mode * * Copyright 2009 Sascha Hauer, Pengutronix * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * */ #include #include #include #include #include #include #include #include #include "imx-audmux.h" static struct snd_soc_card imx_phycore; static struct snd_soc_ops imx_phycore_hifi_ops = { }; static struct snd_soc_dai_link imx_phycore_dai_ac97[] = { { .name = "HiFi", .stream_name = "HiFi", .codec_dai_name = "wm9712-hifi", .codec_name = "wm9712-codec", .cpu_dai_name = "imx-ssi.0", .platform_name = "imx-ssi.0", .ops = &imx_phycore_hifi_ops, }, }; static struct snd_soc_card imx_phycore = { .name = "PhyCORE-ac97-audio", .owner = THIS_MODULE, .dai_link = imx_phycore_dai_ac97, .num_links = ARRAY_SIZE(imx_phycore_dai_ac97), }; static struct platform_device *imx_phycore_snd_ac97_device; static struct platform_device *imx_phycore_snd_device; static int __init imx_phycore_init(void) { int ret; if (machine_is_pca100()) { imx_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, IMX_AUDMUX_V1_PCR_SYN | /* 4wire mode */ IMX_AUDMUX_V1_PCR_TFCSEL(3) | IMX_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */ IMX_AUDMUX_V1_PCR_RXDSEL(3)); imx_audmux_v1_configure_port(3, IMX_AUDMUX_V1_PCR_SYN | /* 4wire mode */ IMX_AUDMUX_V1_PCR_TFCSEL(0) | IMX_AUDMUX_V1_PCR_TFSDIR | IMX_AUDMUX_V1_PCR_RXDSEL(0)); } else if (machine_is_pcm043()) { imx_audmux_v2_configure_port(3, IMX_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ IMX_AUDMUX_V2_PTCR_TFSEL(0) | IMX_AUDMUX_V2_PTCR_TFSDIR, IMX_AUDMUX_V2_PDCR_RXDSEL(0)); imx_audmux_v2_configure_port(0, IMX_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ IMX_AUDMUX_V2_PTCR_TCSEL(3) | IMX_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ IMX_AUDMUX_V2_PDCR_RXDSEL(3)); } else { /* return happy. We might run on a totally different machine */ return 0; } imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1); if (!imx_phycore_snd_ac97_device) return -ENOMEM; platform_set_drvdata(imx_phycore_snd_ac97_device, &imx_phycore); ret = platform_device_add(imx_phycore_snd_ac97_device); if (ret) goto fail1; imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1); if (!imx_phycore_snd_device) { ret = -ENOMEM; goto fail2; } ret = platform_device_add(imx_phycore_snd_device); if (ret) { printk(KERN_ERR "ASoC: Platform device allocation failed\n"); goto fail3; } return 0; fail3: platform_device_put(imx_phycore_snd_device); fail2: platform_device_del(imx_phycore_snd_ac97_device); fail1: platform_device_put(imx_phycore_snd_ac97_device); return ret; } static void __exit imx_phycore_exit(void) { platform_device_unregister(imx_phycore_snd_device); platform_device_unregister(imx_phycore_snd_ac97_device); } late_initcall(imx_phycore_init); module_exit(imx_phycore_exit); MODULE_AUTHOR("Sascha Hauer "); MODULE_DESCRIPTION("PhyCORE ALSA SoC driver"); MODULE_LICENSE("GPL"); e='id' value='c929ea0b910355e1876c64431f3d5802f95b3d75'/>
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2017-01-20 16:48:39 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2017-01-24 15:29:24 -0500
commitc929ea0b910355e1876c64431f3d5802f95b3d75 (patch)
tree94339f18c2be5b9308b9f44ac8b450fe58bcc645 /sound/soc/pxa/pxa2xx-ac97.h
parenta430607b2ef7c3be090f88c71cfcb1b3988aa7c0 (diff)
SUNRPC: cleanup ida information when removing sunrpc module
After removing sunrpc module, I get many kmemleak information as, unreferenced object 0xffff88003316b1e0 (size 544): comm "gssproxy", pid 2148, jiffies 4294794465 (age 4200.081s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffffb0cfb58a>] kmemleak_alloc+0x4a/0xa0 [<ffffffffb03507fe>] kmem_cache_alloc+0x15e/0x1f0 [<ffffffffb0639baa>] ida_pre_get+0xaa/0x150 [<ffffffffb0639cfd>] ida_simple_get+0xad/0x180 [<ffffffffc06054fb>] nlmsvc_lookup_host+0x4ab/0x7f0 [lockd] [<ffffffffc0605e1d>] lockd+0x4d/0x270 [lockd] [<ffffffffc06061e5>] param_set_timeout+0x55/0x100 [lockd] [<ffffffffc06cba24>] svc_defer+0x114/0x3f0 [sunrpc] [<ffffffffc06cbbe7>] svc_defer+0x2d7/0x3f0 [sunrpc] [<ffffffffc06c71da>] rpc_show_info+0x8a/0x110 [sunrpc] [<ffffffffb044a33f>] proc_reg_write+0x7f/0xc0 [<ffffffffb038e41f>] __vfs_write+0xdf/0x3c0 [<ffffffffb0390f1f>] vfs_write+0xef/0x240 [<ffffffffb0392fbd>] SyS_write+0xad/0x130 [<ffffffffb0d06c37>] entry_SYSCALL_64_fastpath+0x1a/0xa9 [<ffffffffffffffff>] 0xffffffffffffffff I found, the ida information (dynamic memory) isn't cleanup. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Fixes: 2f048db4680a ("SUNRPC: Add an identifier for struct rpc_clnt") Cc: stable@vger.kernel.org # v3.12+ Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'sound/soc/pxa/pxa2xx-ac97.h')