aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-09-23 02:25:05 -0400
committerTakashi Iwai <tiwai@suse.de>2011-09-23 02:29:08 -0400
commit2ca595ab7a557f6cee21bf073fe2a242004cd19e (patch)
tree8aad53a6f17f43e437235422e2735756ae97f9f9 /sound/pci/rme9652
parent643d6bbb9637a9b4bb47ec1a1ae3adf3ff9d75a1 (diff)
ALSA: hdspm - cleanup __user tags in ioctl()
This makes the code cleaner and silences a Sparse complaint: sound/pci/rme9652/hdspm.c:6341:23: warning: incorrect type in assignment (incompatible argument 4 (different address spaces)) sound/pci/rme9652/hdspm.c:6341:23: expected int ( *ioctl )( ... ) sound/pci/rme9652/hdspm.c:6341:23: got int ( static [toplevel] *<noident> )( ... ) sound/pci/rme9652/hdspm.c:6102:44: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6225:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6264:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6283:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6289:59: warning: dereference of noderef expression Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r--sound/pci/rme9652/hdspm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index bf438d121afe..6e2f7ef7ddb1 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -6097,7 +6097,7 @@ static inline int copy_u32_le(void __user *dest, void __iomem *src)
6097} 6097}
6098 6098
6099static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, 6099static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
6100 unsigned int cmd, unsigned long __user arg) 6100 unsigned int cmd, unsigned long arg)
6101{ 6101{
6102 void __user *argp = (void __user *)arg; 6102 void __user *argp = (void __user *)arg;
6103 struct hdspm *hdspm = hw->private_data; 6103 struct hdspm *hdspm = hw->private_data;
@@ -6222,7 +6222,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
6222 info.line_out = hdspm_line_out(hdspm); 6222 info.line_out = hdspm_line_out(hdspm);
6223 info.passthru = 0; 6223 info.passthru = 0;
6224 spin_unlock_irq(&hdspm->lock); 6224 spin_unlock_irq(&hdspm->lock);
6225 if (copy_to_user((void __user *) arg, &info, sizeof(info))) 6225 if (copy_to_user(argp, &info, sizeof(info)))
6226 return -EFAULT; 6226 return -EFAULT;
6227 break; 6227 break;
6228 6228
@@ -6261,7 +6261,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
6261 break; 6261 break;
6262 } 6262 }
6263 6263
6264 if (copy_to_user((void __user *) arg, &status, sizeof(status))) 6264 if (copy_to_user(argp, &status, sizeof(status)))
6265 return -EFAULT; 6265 return -EFAULT;
6266 6266
6267 6267
@@ -6280,13 +6280,13 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
6280 if (hdspm->tco) 6280 if (hdspm->tco)
6281 hdspm_version.addons |= HDSPM_ADDON_TCO; 6281 hdspm_version.addons |= HDSPM_ADDON_TCO;
6282 6282
6283 if (copy_to_user((void __user *) arg, &hdspm_version, 6283 if (copy_to_user(argp, &hdspm_version,
6284 sizeof(hdspm_version))) 6284 sizeof(hdspm_version)))
6285 return -EFAULT; 6285 return -EFAULT;
6286 break; 6286 break;
6287 6287
6288 case SNDRV_HDSPM_IOCTL_GET_MIXER: 6288 case SNDRV_HDSPM_IOCTL_GET_MIXER:
6289 if (copy_from_user(&mixer, (void __user *)arg, sizeof(mixer))) 6289 if (copy_from_user(&mixer, argp, sizeof(mixer)))
6290 return -EFAULT; 6290 return -EFAULT;
6291 if (copy_to_user((void __user *)mixer.mixer, hdspm->mixer, 6291 if (copy_to_user((void __user *)mixer.mixer, hdspm->mixer,
6292 sizeof(struct hdspm_mixer))) 6292 sizeof(struct hdspm_mixer)))