/* First we unregister the device, make sure the driver can do it's resource release thing and then we try to release any left over resources. We take a ref to the device, to make sure it doesn't dissapear under our feet.  */
void umc_device_unregister(struct umc_dev *umc)
/* First we unregister the device, make sure the driver can do it's resource release thing and then we try to release any left over resources. We take a ref to the device, to make sure it doesn't dissapear under our feet.  */
void umc_device_unregister(struct umc_dev *umc)
{
	struct device *dev;
	if (!umc)
		return;
	dev = get_device(&umc->dev);
	device_unregister(&umc->dev);
	release_resource(&umc->resource);
	put_device(dev);
}