Re: searching for pci busses

From: Matthew Wilcox
Date: Tue May 30 2006 - 13:00:16 EST


On Tue, May 30, 2006 at 12:52:31PM -0400, Jon Smirl wrote:
> This is how DRM does it...

> for (i = 0; driver->pci_driver.id_table[i].vendor != 0; i++) {
> pid = (struct pci_device_id *)&driver->pci_driver.id_table[i];

Why do you cast away the const warning? Why not just make pid a pointer
to const? drm_get_dev already has the const qualifier, so somebody
realised what the right thing to do was.

But looking at this code just reinforces the basic problem -- that DRM
does everything wrong and it needs shooting in the head.
-
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/