[RFC PATCH] pci: Improve handling of constant id_table pointer

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Apr 15 00:09:24 PDT 2015


On Wed, Apr 15, 2015 at 07:27:46AM +0200, Sascha Hauer wrote:
> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
> index d6c5496..9fec4d7 100644
> --- a/drivers/pci/bus.c
> +++ b/drivers/pci/bus.c
> @@ -27,11 +27,11 @@ static int pci_match(struct device_d *dev, struct driver_d *drv)
>  {
>  	struct pci_dev *pdev = to_pci_dev(dev);
>  	struct pci_driver *pdrv = to_pci_driver(drv);
> -	struct pci_device_id *id;
> +	const struct pci_device_id *id;
>  
>  	for (id = (struct pci_device_id *)pdrv->id_table; id->vendor; id++)
This cast can then be dropped, too.

Otherwise,
Acked-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>

Thanks
Uwe


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the barebox mailing list