/* ubi_put_device - drop an UBI device reference. @ubi: UBI device description object  */
void ubi_put_device(struct ubi_device *ubi)
/* ubi_put_device - drop an UBI device reference. @ubi: UBI device description object  */
void ubi_put_device(struct ubi_device *ubi)
{
	spin_lock(&ubi_devices_lock);
	ubi->ref_count -= 1;
	put_device(&ubi->dev);
	spin_unlock(&ubi_devices_lock);
}