From 4c9a77ace93000ba7b4f10da0e6e6899da6d238b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Mar 2006 01:17:00 -0300 Subject: Tea6420: missing #define (< 2.6.16) From: Darren Salt tea6420: fix missing #define for kernels < 2.6.16 Change set 3653:388da79ac33b broke compilation of tea6420.c on kernels older than 2.6.16. This patch fixes it. Signed-off-by: Darren Salt Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tea6420.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/tea6420.c') diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index 74af061b2..72ed34e08 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -38,6 +38,7 @@ static int debug = 0; /* insmod parameter */ module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) +#define dprintk(args...) \ do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __FUNCTION__, __LINE__); printk(args); } } while (0) #else #define dprintk(args...) \ -- cgit v1.2.3 From 6c7054ea82d8b4745c6293b852813671bbf8b5ba Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Mar 2006 15:19:26 -0300 Subject: zmalloc changed to kzmalloc; semaphore to mutex From: Mauro Carvalho Chehab kernel-sync Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tea6420.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'linux/drivers/media/video/tea6420.c') diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index 72ed34e08..9896661da 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -109,11 +109,10 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind) } /* allocate memory for client structure */ - client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (0 == client) { return -ENOMEM; } - memset(client, 0x0, sizeof(struct i2c_client)); /* fill client structure */ memcpy(client, &client_template, sizeof(struct i2c_client)); -- cgit v1.2.3