diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-12 13:53:18 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-12 16:36:47 -0400 |
commit | d209974cdc36aeeef406fa2019e9e1dacecbb979 (patch) | |
tree | eb028490375c6651cebe1e054bb2efdb5ceb787a /sound/oss/au1550_ac97.c | |
parent | 90dc763fef4c869e60b2a7ad92e1a7dab68575ea (diff) |
sound/oss: convert to unlocked_ioctl
These are the final conversions for the ioctl file operation so we can remove
it in the next merge window.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/oss/au1550_ac97.c')
-rw-r--r-- | sound/oss/au1550_ac97.c | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index fb913e568de..0fd256ceea6 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c | |||
@@ -827,22 +827,26 @@ mixdev_ioctl(struct ac97_codec *codec, unsigned int cmd, | |||
827 | return codec->mixer_ioctl(codec, cmd, arg); | 827 | return codec->mixer_ioctl(codec, cmd, arg); |
828 | } | 828 | } |
829 | 829 | ||
830 | static int | 830 | static long |
831 | au1550_ioctl_mixdev(struct inode *inode, struct file *file, | 831 | au1550_ioctl_mixdev(struct file *file, unsigned int cmd, unsigned long arg) |
832 | unsigned int cmd, unsigned long arg) | ||
833 | { | 832 | { |
834 | struct au1550_state *s = (struct au1550_state *)file->private_data; | 833 | struct au1550_state *s = (struct au1550_state *)file->private_data; |
835 | struct ac97_codec *codec = s->codec; | 834 | struct ac97_codec *codec = s->codec; |
835 | int ret; | ||
836 | |||
837 | lock_kernel(); | ||
838 | ret = mixdev_ioctl(codec, cmd, arg); | ||
839 | unlock_kernel(); | ||
836 | 840 | ||
837 | return mixdev_ioctl(codec, cmd, arg); | 841 | return ret; |
838 | } | 842 | } |
839 | 843 | ||
840 | static /*const */ struct file_operations au1550_mixer_fops = { | 844 | static /*const */ struct file_operations au1550_mixer_fops = { |
841 | owner:THIS_MODULE, | 845 | .owner = THIS_MODULE, |
842 | llseek:au1550_llseek, | 846 | .llseek = au1550_llseek, |
843 | ioctl:au1550_ioctl_mixdev, | 847 | .unlocked_ioctl = au1550_ioctl_mixdev, |
844 | open:au1550_open_mixdev, | 848 | .open = au1550_open_mixdev, |
845 | release:au1550_release_mixdev, | 849 | .release = au1550_release_mixdev, |
846 | }; | 850 | }; |
847 | 851 | ||
848 | static int | 852 | static int |
@@ -1346,8 +1350,7 @@ dma_count_done(struct dmabuf *db) | |||
1346 | 1350 | ||
1347 | 1351 | ||
1348 | static int | 1352 | static int |
1349 | au1550_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 1353 | au1550_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
1350 | unsigned long arg) | ||
1351 | { | 1354 | { |
1352 | struct au1550_state *s = (struct au1550_state *)file->private_data; | 1355 | struct au1550_state *s = (struct au1550_state *)file->private_data; |
1353 | unsigned long flags; | 1356 | unsigned long flags; |
@@ -1783,6 +1786,17 @@ au1550_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
1783 | return mixdev_ioctl(s->codec, cmd, arg); | 1786 | return mixdev_ioctl(s->codec, cmd, arg); |
1784 | } | 1787 | } |
1785 | 1788 | ||
1789 | static long | ||
1790 | au1550_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
1791 | { | ||
1792 | int ret; | ||
1793 | |||
1794 | lock_kernel(); | ||
1795 | ret = au1550_ioctl(file, cmd, arg); | ||
1796 | unlock_kernel(); | ||
1797 | |||
1798 | return ret; | ||
1799 | } | ||
1786 | 1800 | ||
1787 | static int | 1801 | static int |
1788 | au1550_open(struct inode *inode, struct file *file) | 1802 | au1550_open(struct inode *inode, struct file *file) |
@@ -1893,15 +1907,15 @@ au1550_release(struct inode *inode, struct file *file) | |||
1893 | } | 1907 | } |
1894 | 1908 | ||
1895 | static /*const */ struct file_operations au1550_audio_fops = { | 1909 | static /*const */ struct file_operations au1550_audio_fops = { |
1896 | owner: THIS_MODULE, | 1910 | .owner = THIS_MODULE, |
1897 | llseek: au1550_llseek, | 1911 | .llseek = au1550_llseek, |
1898 | read: au1550_read, | 1912 | .read = au1550_read, |
1899 | write: au1550_write, | 1913 | .write = au1550_write, |
1900 | poll: au1550_poll, | 1914 | .poll = au1550_poll, |
1901 | ioctl: au1550_ioctl, | 1915 | .unlocked_ioctl = au1550_unlocked_ioctl, |
1902 | mmap: au1550_mmap, | 1916 | .mmap = au1550_mmap, |
1903 | open: au1550_open, | 1917 | .open = au1550_open, |
1904 | release: au1550_release, | 1918 | .release = au1550_release, |
1905 | }; | 1919 | }; |
1906 | 1920 | ||
1907 | MODULE_AUTHOR("Advanced Micro Devices (AMD), dan@embeddededge.com"); | 1921 | MODULE_AUTHOR("Advanced Micro Devices (AMD), dan@embeddededge.com"); |