lkml.org 
[lkml]   [2005]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCI driver
Rolf Eike Beer wrote:

>Manu Abraham wrote:
>
>
>
>>So it now looks like this but i have another problem now, after
>>consecutive, load/unload, i get an oops ..
>>
>>
>
>No idea, sorry.
>
>
>
>>static int __devinit mantis_pci_probe(struct pci_dev *pdev,
>> const struct pci_device_id *mantis_pci_table)
>>{
>> u8 revision, latency;
>>// u8 data[2];
>> struct mantis_pci *mantis;
>>
>> dprintk(verbose, MANTIS_ERROR, 1, "<1:>IRQ=%d", pdev->irq);
>> if (pci_enable_device(pdev)) {
>> dprintk(verbose, MANTIS_ERROR, 1, "Mantis PCI enable failed");
>> goto err;
>> }
>> dprintk(verbose, MANTIS_ERROR, 1, "<2:>IRQ=%d", pdev->irq);
>>
>> mantis = (struct mantis_pci *)
>> kmalloc(sizeof (struct mantis_pci), GFP_KERNEL);
>>
>>
>
>mantis = kmalloc(sizeof(*mantis), GFP_KERNEL);
>
>You don't have to cast a void* to any other pointer and this way you will
>always get the correct size of memory allocated, even if mantis will become
>another pointer type.
>
>
>
Thanks i will keep it in mind, while i get on with the rest. Stuck on
with the Oops at the moment.
FIrst load unload seems to be okay, second one also, but sometimes it is
the 3rd load, or sometimes it is the unload ..

Sounds a bit weird also ..


Thanks,
Manu


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-15 19:13    [W:0.069 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site