From 8551158abc8ef45a7f473a87e69624d05ebfd684 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Mon, 7 Nov 2005 06:31:45 -0500 Subject: kmalloc/kzalloc changes: dv1394, eth1394, ieee1394, ohci1394, pcilynx, raw1394, sbp2c, video1394: - use kzalloc - provide safer size arguments to kmalloc and kzalloc - omit some casts Signed-off-by: Stefan Richter Signed-off-by: Jody McIntyre --- drivers/ieee1394/dv1394.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/ieee1394/dv1394.c') diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index cbbbe14b884..d204ec772c0 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c @@ -2218,14 +2218,12 @@ static int dv1394_init(struct ti_ohci *ohci, enum pal_or_ntsc format, enum modes unsigned long flags; int i; - video = kmalloc(sizeof(struct video_card), GFP_KERNEL); + video = kzalloc(sizeof(*video), GFP_KERNEL); if (!video) { printk(KERN_ERR "dv1394: cannot allocate video_card\n"); goto err; } - memset(video, 0, sizeof(struct video_card)); - video->ohci = ohci; /* lower 2 bits of id indicate which of four "plugs" per host */ -- cgit v1.2.3 From ef797546a93fffa9d8508e7c8539b352b6678568 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Mon, 7 Nov 2005 06:31:50 -0500 Subject: Remove definitions of unreferenced macros virt_to_page and vmalloc_32 from dv1394 and video1394. Signed-off-by: Stefan Richter Signed-off-by: Jody McIntyre --- drivers/ieee1394/dv1394.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'drivers/ieee1394/dv1394.c') diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index d204ec772c0..196db743927 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c @@ -123,15 +123,6 @@ #include "ohci1394.h" -#ifndef virt_to_page -#define virt_to_page(x) MAP_NR(x) -#endif - -#ifndef vmalloc_32 -#define vmalloc_32(x) vmalloc(x) -#endif - - /* DEBUG LEVELS: 0 - no debugging messages 1 - some debugging messages, but none during DMA frame transmission -- cgit v1.2.3