git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
media
/
radio
/
radio-maxiradio.c
diff --git
a/drivers/media/radio/radio-maxiradio.c
b/drivers/media/radio/radio-maxiradio.c
index
c3c6209
..
f0bf47b
100644
(file)
--- a/
drivers/media/radio/radio-maxiradio.c
+++ b/
drivers/media/radio/radio-maxiradio.c
@@
-37,7
+37,8
@@
#include <linux/sched.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <linux/sched.h>
#include <asm/io.h>
#include <asm/uaccess.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
+
#include <linux/pci.h>
#include <linux/videodev.h>
#include <linux/pci.h>
#include <linux/videodev.h>
@@
-57,7
+58,7
@@
static const int clk = 1, data = 2, wren = 4, mo_st = 8, power = 16 ;
static int radio_nr = -1;
static const int clk = 1, data = 2, wren = 4, mo_st = 8, power = 16 ;
static int radio_nr = -1;
-
MODULE_PARM(radio_nr, "i"
);
+
module_param(radio_nr, int, 0
);
#define FREQ_LO 50*16000
#define FREQ_LO 50*16000
@@
-80,6
+81,7
@@
static struct file_operations maxiradio_fops = {
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = radio_ioctl,
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = radio_ioctl,
+ .compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};
static struct video_device maxiradio_radio =
.llseek = no_llseek,
};
static struct video_device maxiradio_radio =
@@
-100,7
+102,7
@@
static struct radio_device
unsigned long freq;
unsigned long freq;
- struct
semaphore
lock;
+ struct
mutex
lock;
} radio_unit = {0, 0, 0, 0, };
} radio_unit = {0, 0, 0, 0, };
@@
-166,7
+168,7
@@
static int get_tune(__u16 io)
}
}
-
inline static
int radio_function(struct inode *inode, struct file *file,
+
static inline
int radio_function(struct inode *inode, struct file *file,
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
unsigned int cmd, void *arg)
{
struct video_device *dev = video_devdata(file);
@@
-266,9
+268,9
@@
static int radio_ioctl(struct inode *inode, struct file *file,
struct radio_device *card=dev->priv;
int ret;
struct radio_device *card=dev->priv;
int ret;
-
down
(&card->lock);
+
mutex_lock
(&card->lock);
ret = video_usercopy(inode, file, cmd, arg, radio_function);
ret = video_usercopy(inode, file, cmd, arg, radio_function);
-
up
(&card->lock);
+
mutex_unlock
(&card->lock);
return ret;
}
return ret;
}
@@
-289,7
+291,7
@@
static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_d
goto err_out_free_region;
radio_unit.io = pci_resource_start(pdev, 0);
goto err_out_free_region;
radio_unit.io = pci_resource_start(pdev, 0);
-
init_MUTEX
(&radio_unit.lock);
+
mutex_init
(&radio_unit.lock);
maxiradio_radio.priv = &radio_unit;
if(video_register_device(&maxiradio_radio, VFL_TYPE_RADIO, radio_nr)==-1) {
maxiradio_radio.priv = &radio_unit;
if(video_register_device(&maxiradio_radio, VFL_TYPE_RADIO, radio_nr)==-1) {
@@
-335,12
+337,12
@@
static struct pci_driver maxiradio_driver = {
.remove = __devexit_p(maxiradio_remove_one),
};
.remove = __devexit_p(maxiradio_remove_one),
};
-int __init maxiradio_radio_init(void)
+
static
int __init maxiradio_radio_init(void)
{
{
- return pci_
module_init
(&maxiradio_driver);
+ return pci_
register_driver
(&maxiradio_driver);
}
}
-void __exit maxiradio_radio_exit(void)
+
static
void __exit maxiradio_radio_exit(void)
{
pci_unregister_driver(&maxiradio_driver);
}
{
pci_unregister_driver(&maxiradio_driver);
}