RE: [PATCH] cpqarray update

From: Wiran, Francis
Date: Mon Jan 26 2004 - 20:39:13 EST


> You need to check the return value of pci_module_init() for errors.
No, because the return value is determined from number of ctrls found,
and not from function return.

int __init cpqarray_init(void)
{
...
pci_module_init(&cpqarray_pci_driver);
cpqarray_eisa_detect();

for(i=0;i<MAX_CTLR;i++) {
if(hba[i] != NULL)
num_ctlrs_reg++
}

return (num_ctlrs_reg);
}

int __init cpqarray_init_module(void)
{
if (cpqarray_init() == 0)
return -ENODEV;
return 0;
}

regards,
-francis-



> -----Original Message-----
> From: Jeff Garzik [mailto:jgarzik@xxxxxxxxx]
> Sent: Monday, January 26, 2004 2:15 PM
> To: Linux Kernel Mailing List; Wiran, Francis
> Subject: Re: [PATCH] cpqarray update
>
>
> Linux Kernel Mailing List wrote:
> > ChangeSet 1.1288, 2004/01/26 16:58:21-02:00, francis.wiran@xxxxxx
> >
> > [PATCH] cpqarray update
> >
> > Yes, we should. I usually ask Mike Miller in our group
> to send my
> > patches since he's been doing that and more known in
> the community, but
> > since you already got a hold of it ...yes, please :)
> >
> > CHANGELOG:
> >
> > * Fix for eisa card not detecting partitions properly
> > * Use pci_module_init instead of pci_register_device
> to handle hotplug
> > scenario and unregister if the driver can't find
> pci controller
> > * Add BLKSSZGET ioctl
> [...]
> > @@ -616,7 +623,7 @@
> >
> > /* detect controllers */
> > printk(DRIVER_NAME "\n");
> > - pci_register_driver(&cpqarray_pci_driver);
> > + pci_module_init(&cpqarray_pci_driver);
> > cpqarray_eisa_detect();
> >
> > for(i=0; i< MAX_CTLR; i++) {
>
> You need to check the return value of pci_module_init() for errors.
>
> Jeff
>
>
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/