Commit e006558f authored by Zhen Lei's avatar Zhen Lei Committed by Mauro Carvalho Chehab
Browse files

media: exynos4-is: use DEVICE_ATTR_RW() helper macro



Use DEVICE_ATTR_RW() helper macro instead of DEVICE_ATTR(), which is
simpler and more readable.

Due to the names of the read and write functions of the sysfs attribute is
normalized, there is a natural association.

Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 9256de06
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -1238,7 +1238,7 @@ static const struct media_device_ops fimc_md_ops = {
	.link_notify = fimc_md_link_notify,
};

static ssize_t fimc_md_sysfs_show(struct device *dev,
static ssize_t subdev_conf_mode_show(struct device *dev,
				     struct device_attribute *attr, char *buf)
{
	struct fimc_md *fmd = dev_get_drvdata(dev);
@@ -1249,7 +1249,7 @@ static ssize_t fimc_md_sysfs_show(struct device *dev,
	return strscpy(buf, "V4L2 video node only API (vid-dev)\n", PAGE_SIZE);
}

static ssize_t fimc_md_sysfs_store(struct device *dev,
static ssize_t subdev_conf_mode_store(struct device *dev,
				      struct device_attribute *attr,
				      const char *buf, size_t count)
{
@@ -1278,8 +1278,7 @@ static ssize_t fimc_md_sysfs_store(struct device *dev,
 *  sub-dev - for media controller API, subdevs must be configured in user
 *  space before starting streaming.
 */
static DEVICE_ATTR(subdev_conf_mode, S_IWUSR | S_IRUGO,
		   fimc_md_sysfs_show, fimc_md_sysfs_store);
static DEVICE_ATTR_RW(subdev_conf_mode);

static int cam_clk_prepare(struct clk_hw *hw)
{