summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-02-05 14:56:20 +0100
committerJaroslav Kysela <perex@suse.cz>2007-02-09 09:03:56 +0100
commit88cb42901f1572c95f5933f363cfebd5044c716a (patch)
tree8eed3d46c81996e780375ff91ae1955f3265629d /sound/soc/soc-dapm.c
parent1ab774e049085da6facfaf3b24d54158c3f0f5b3 (diff)
downloadop-kernel-dev-88cb42901f1572c95f5933f363cfebd5044c716a.zip
op-kernel-dev-88cb42901f1572c95f5933f363cfebd5044c716a.tar.gz
[ALSA] soc - Clean up with kmemdup()
Clean up by replacing with kmemdup(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index d0162a4..7caf8c7 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -87,16 +87,10 @@ module_param(dapm_status, int, 0);
MODULE_PARM_DESC(dapm_status, "enable DPM sysfs entries");
/* create a new dapm widget */
-static struct snd_soc_dapm_widget *dapm_cnew_widget(
+static inline struct snd_soc_dapm_widget *dapm_cnew_widget(
const struct snd_soc_dapm_widget *_widget)
{
- struct snd_soc_dapm_widget* widget;
- widget = kmalloc(sizeof(struct snd_soc_dapm_widget), GFP_KERNEL);
- if (!widget)
- return NULL;
-
- memcpy(widget, _widget, sizeof(struct snd_soc_dapm_widget));
- return widget;
+ return kmemdup(_widget, sizeof(*_widget), GFP_KERNEL);
}
/* set up initial codec paths */
OpenPOWER on IntegriCloud