From 73020b46e06d7107e869d9c03a18ef97e0ab52ab Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 11 Jan 2009 13:02:54 -0200 Subject: Convert to be a pci driver From: Trent Piepho This is a really old and crufty driver that wasn't using the long established pci driver framework. Priority: normal Signed-off-by: Trent Piepho Acked-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/zoran/zoran_card.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/zoran/zoran_card.h') diff --git a/linux/drivers/media/video/zoran/zoran_card.h b/linux/drivers/media/video/zoran/zoran_card.h index e4dc9d29b..c989448a7 100644 --- a/linux/drivers/media/video/zoran/zoran_card.h +++ b/linux/drivers/media/video/zoran/zoran_card.h @@ -40,7 +40,7 @@ extern int zr36067_debug; /* Anybody who uses more than four? */ #define BUZ_MAX 4 -extern int zoran_num; +extern atomic_t zoran_num; extern struct zoran *zoran[BUZ_MAX]; extern struct video_device zoran_template; -- cgit v1.2.3 From 3bb4728d5f8d659362a60e10f4d8d64df7418940 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Mon, 12 Jan 2009 08:09:46 -0800 Subject: zoran: Remove global device array From: Trent Piepho The driver was keeping a global array with an entry for each zoran device probed. It was a leftover from when the driver didn't dynamically allocate the driver data for each device. There was only one use left, in the video device's ->open() method, looking up the struct zoran for the opened device from the minor number. This can be done better with video_get_drvdata(). Since zoran_num is now only used in the pci driver's ->probe() method, it doesn't need to be an atomic_t and be static. There is a race if multiple zoran cards could be probed at the same time, but currently the probe method for a given driver is single threaded. Priority: normal Signed-off-by: Trent Piepho Acked-by: Jean Delvare --- linux/drivers/media/video/zoran/zoran_card.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'linux/drivers/media/video/zoran/zoran_card.h') diff --git a/linux/drivers/media/video/zoran/zoran_card.h b/linux/drivers/media/video/zoran/zoran_card.h index c989448a7..4507bdc5e 100644 --- a/linux/drivers/media/video/zoran/zoran_card.h +++ b/linux/drivers/media/video/zoran/zoran_card.h @@ -40,8 +40,6 @@ extern int zr36067_debug; /* Anybody who uses more than four? */ #define BUZ_MAX 4 -extern atomic_t zoran_num; -extern struct zoran *zoran[BUZ_MAX]; extern struct video_device zoran_template; -- cgit v1.2.3