tcic kj audit
Subsystems (2)
Hi,
This patch changes char* into char[] and add's KERN_* to some printks to tcic.
chuck
drivers/pcmcia/tcic.c +6 -6
@@ -58,7 +58,7 @@#ifdef PCMCIA_DEBUG static int pc_debug =PCMCIA_DEBUG ;MODULE_PARM (pc_debug,"i" ); -static const char *version = +static const char version[] ="tcic.c 1.111 2000/02/15 04:13:12 (David Hinds)" ; #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)#else
@@ -337,7 +337,7 @@ static int __init is_active(int s)if ((sstat &TCIC_SSTAT_CD ) && (pwr &TCIC_PWR_VCC (s)) && (scf1 &TCIC_SCF1_IOSTS ) && (ioctl &TCIC_ICTL_ENA ) && - (check_region (base, num) !=0 ) && ((base &0xfeef ) !=0x02e8 )) + (region_request (base, num) !=0 ) && ((base &0xfeef ) !=0x02e8 ))return 1 ;else return 0 ;
@@ -403,7 +403,7 @@ static int __init init_tcic(void) sock =0 ;if (!request_region (tcic_base,16 ,"tcic-2" )) { -printk ("could not allocate ports,\n " ); +printk (KERN_INFO "could not allocate ports,\n " );driver_unregister (&tcic_driver);return -ENODEV ; }
@@ -505,11 +505,11 @@ static int __init init_tcic(void) }if (socket_table[0 ].socket.irq_mask & (1 <<11 )) -printk ("sktirq is irq 11, " ); +printk (KERN_INFO "sktirq is irq 11, " );if (cs_irq !=0 ) -printk ("status change on irq %d\n" , cs_irq); +printk (KERN_NOTICE "status change on irq %d\n" , cs_irq);else -printk ("polled status, interval = %d ms\n" , +printk (KERN_INFO "polled status, interval = %d ms\n" , poll_interval *1000 /HZ );for (i =0 ; i < sockets; i++) {
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
drivers/pcmcia/tcic.c static int __init is_active(int s) · line 343
Quoted 9 lines · Chuck Short
drivers/pcmcia/tcic.c +1
-1@@ -337,7 +337,7 @@ static int __init is_active(int s)if ((sstat &TCIC_SSTAT_CD ) && (pwr &TCIC_PWR_VCC (s)) && (scf1 &TCIC_SCF1_IOSTS ) && (ioctl &TCIC_ICTL_ENA ) && - (check_region (base, num) !=0 ) && ((base &0xfeef ) !=0x02e8 )) + (region_request (base, num) !=0 ) && ((base &0xfeef ) !=0x02e8 ))return 1 ;else return 0 ;
I guess you didn't even compile test this one ?
You'll also need to release the region at some point. check_region fixes aren't just a simple search & replace.
Dave
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 7 lines · Chuck Short
Hi,
This patch changes char* into char[] and add's KERN_* to some printks to tcic.
chuck
@@ -337,7 +337,7 @@ static int __init is_active(int s)
if ((sstat & TCIC_SSTAT_CD) && (pwr & TCIC_PWR_VCC(s)) &&
(scf1 & TCIC_SCF1_IOSTS) && (ioctl & TCIC_ICTL_ENA) &&- (check_region(base, num) != 0) && ((base & 0xfeef) != 0x02e8))
+ (region_request(base, num) != 0) && ((base & 0xfeef) != 0x02e8))
---
What is this?
I guess you didn't compile test it :-)
Domen
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors