/* Remove a RIO device from the system. If it has an associated driver, then run the driver remove() method. Then update the reference count.  */
static int rio_device_remove(struct device *dev)
/* Remove a RIO device from the system. If it has an associated driver, then run the driver remove() method. Then update the reference count.  */
static int rio_device_remove(struct device *dev)
{
	struct rio_dev *rdev = to_rio_dev(dev);
	struct rio_driver *rdrv = rdev->driver;
	if (rdrv) {
		if (rdrv->remove)
			rdrv->remove(rdev);
		rdev->driver = NULL;
	}
	rio_dev_put(rdev);
	return 0;
}