From d56dc61265d2527a63ab5b0f03199a43cd89ca36 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 30 Jul 2008 08:43:36 -0300 Subject: V4L/DVB (8613): v4l: move BKL down to the driver level. The BKL is now moved from the video_open function in v4l2-dev.c to the various drivers. It seems about a third of the drivers already has a lock of some sort protecting the open(), another third uses video_exclusive_open (yuck!) and the last third required adding the BKL in their open function. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/stv680.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/media/video/stv680.c') diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index dce947439459..b21a8d6827c4 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c @@ -1086,6 +1086,7 @@ static int stv_open (struct inode *inode, struct file *file) int err = 0; /* we are called with the BKL held */ + lock_kernel(); stv680->user = 1; err = stv_init (stv680); /* main initialization routine for camera */ @@ -1099,6 +1100,7 @@ static int stv_open (struct inode *inode, struct file *file) } if (err) stv680->user = 0; + unlock_kernel(); return err; } -- cgit v1.2.2 From a482f327ff56bc3cf53176a7eb736cea47291a1d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 10 Oct 2008 05:08:23 -0300 Subject: V4L/DVB (9116): USB: remove info() macro from usb media drivers USB should not be having it's own printk macros, so remove info() and use the system-wide standard of dev_info() wherever possible. Cc: Douglas Landgraf Cc: Mike Isely Cc: Thierry Merle Cc: Antoine Jacquet Signed-off-by: Greg Kroah-Hartman Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/stv680.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/media/video/stv680.c') diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index b21a8d6827c4..9c549d935994 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c @@ -84,7 +84,8 @@ static unsigned int debug; #define PDEBUG(level, fmt, args...) \ do { \ if (debug >= level) \ - info("[%s:%d] " fmt, __func__, __LINE__ , ## args); \ + printk(KERN_INFO KBUILD_MODNAME " [%s:%d] \n" fmt, \ + __func__, __LINE__ , ## args); \ } while (0) @@ -1552,7 +1553,8 @@ static int __init usb_stv680_init (void) } PDEBUG (0, "STV(i): usb camera driver version %s registering", DRIVER_VERSION); - info(DRIVER_DESC " " DRIVER_VERSION); + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" + DRIVER_DESC "\n"); return 0; } -- cgit v1.2.2