Re: [-mm patch] aic7xxx: check irq validity (was Re: 2.6.18-mm2)

Jeff Garzik
2006-10-01T19:43:09Z

Matthew Wilcox wrote:
> Others tend to use the driver name. Changing them all to be 0000:00:1d.2
> isn't really an improvement in the readability of /proc/interrupts, IMO.

agreed

> Passing pdev as the data is a good idea for practically no device driver.

agreed

> It's rare to actually want the pci_device down in the interrupt handler;
> normally you want the device private data. Using pci_get_drvdata(pdev)
> as the data would make sense for both sym2 and tg3. I don't feel like

Using pci_get_drvdata() is a pretty good idea

> int pci_request_irq(struct pci_dev *pdev, irq_handler_t handler,
> const char *name)
> {
> if (!valid_irq(pdev->irq)) {
> dev_printk(KERN_ERR, &pdev->dev, "invalid irq\n");
> return -EINVAL;
> }
>
> return request_irq(pdev->irq, handler, IRQF_SHARED, name,
> pci_get_drvdata(pdev));
> }
>
> But what about IRQF_SAMPLE_RANDOM?

I still like having a flags argument though. It's enough of an open
question, and I bet there will be a new flag or two in the future that
PCI drivers will want to use.

Jeff