[<prev] [next>] [day] [month] [year] [list]
Message-ID: <71dfdbf0-09a3-4079-954f-cb87fe9b1817@lunn.ch>
Date: Tue, 20 Jun 2023 15:21:09 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
Cc: Christian Marangi <ansuelsmth@...il.com>,
Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Dan Carpenter <dan.carpenter@...aro.org>,
linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [net-next PATCH v5 3/3] leds: trigger: netdev: expose hw_control
status via sysfs
> +static ssize_t hw_control_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct led_netdev_data *trigger_data = led_trigger_get_drvdata
> (dev);
> +
> + return sprintf(buf, "%d\n", trigger_data->hw_control);
>
> [Kalesh]: How about using sysfs_emit?
Currently, there are zero instances of sysfs_emit() in ledtrig-netdev,
and in any files in drivers/leds/trigger/, or even drivers/leds.
So i think it would be better to keep this consistent with the rest of
the code in this file, and have a follow up patchset which reviews and
converts the 52 sprintf() in drivers/leds.
Andrew
Powered by blists - more mailing lists