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

From: Jeff Garzik
Date: Sun Oct 01 2006 - 15:43:27 EST


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


-
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/