Commit f0afa235 authored by YueHaibing's avatar YueHaibing Committed by Vinod Koul
Browse files

phy: phy-twl4030-usb: use DEVICE_ATTR_RO macro



Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR,
which makes the code a bit shorter and easier to read.

Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20210520135132.37628-1-yuehaibing@huawei.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 46923bdb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -544,7 +544,7 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
	return 0;
}

static ssize_t twl4030_usb_vbus_show(struct device *dev,
static ssize_t vbus_show(struct device *dev,
			 struct device_attribute *attr, char *buf)
{
	struct twl4030_usb *twl = dev_get_drvdata(dev);
@@ -557,7 +557,7 @@ static ssize_t twl4030_usb_vbus_show(struct device *dev,

	return ret;
}
static DEVICE_ATTR(vbus, 0444, twl4030_usb_vbus_show, NULL);
static DEVICE_ATTR_RO(vbus);

static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
{