Re: [PATCH v3 2/3] Staging: ipack: added support for the TEWS TPCI-200 carrier board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Samuel,

> +static void tpci200_uninstall(struct tpci200_board *tpci200)
> +{
> +	int i;
> +
> +	for (i = 0; i < TPCI200_NB_SLOT; i++) {
> +		if (tpci200->slots[i].dev == NULL)
> +			continue;
> +		else
> +			tpci200->slots[i].dev->driver->ops->remove(tpci200->slots[i].dev);

Check whether the function exists or you could have trouble :)
If you already added a check when registering to make sure this is always non-NULL then
ignore this. I would recommend wrapping this up in some function:

    void tpci_slot_remove(struct tpci_slot *slot)
    {
        if (slot->dev->driver->ops->remove)
        	slot->dev->driver->ops->remove(slot->dev);
    }

-- 
/manohar
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux