Re: [PATCH] 2.6.10 Altix : ioc4 serial driver support

From: Russell King
Date: Wed Dec 22 2004 - 09:05:17 EST


On Wed, Dec 22, 2004 at 01:44:23PM +0000, Christoph Hellwig wrote:
> > I still save off the pci_dev ptrs for all cards found, so I can
> > register with the serial core after probe (is there a better way?).
> > Should I register the driver separately for each card ? That seems a
> > bit overkill.
>
> You should register them with the serial core in ->probe.

You want to register with the serial core before you register with PCI.
Then add each port when you find it via the PCI driver ->probe method.

Removal is precisely the reverse order - remove each port in ->remove
method first, then unregister from serial core.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/