Re: [PATCH v15 09/13] counter: Implement signalZ_action_component_id sysfs attribute
From: Jonathan Cameron
Date: Sun Aug 15 2021 - 12:55:07 EST
On Mon, 9 Aug 2021 21:37:34 +0900
William Breathitt Gray <vilhelm.gray@xxxxxxxxx> wrote:
> The Generic Counter chrdev interface expects users to supply component
> IDs in order to select Synapses for requests. In order for users to know
> what component ID belongs to which Synapse this information must be
> exposed. The signalZ_action_component_id attribute provides a way for
> users to discover what component ID belongs to the respective Synapse.
>
> Cc: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Reviewed-by: David Lechner <david@xxxxxxxxxxxxxx>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@xxxxxxxxx>
> ---
> Contact: linux-iio@xxxxxxxxxxxxxxx
> diff --git a/drivers/counter/counter-sysfs.c b/drivers/counter/counter-sysfs.c
> index dbb507c9da11..11bef9f8190f 100644
> --- a/drivers/counter/counter-sysfs.c
> +++ b/drivers/counter/counter-sysfs.c
> @@ -393,7 +393,6 @@ static int counter_avail_attr_create(struct device *const dev,
> struct counter_attribute *counter_attr;
> struct device_attribute *dev_attr;
>
> - /* Allocate Counter attribute */
Trivial, but this is an unrelated change and shouldn't be in this patch (it's just noise).
> counter_attr = devm_kzalloc(dev, sizeof(*counter_attr), GFP_KERNEL);
> if (!counter_attr)
> return -ENOMEM;
> @@ -535,6 +534,46 @@ static int counter_name_attr_create(struct device *const dev,
> return 0;
> }
>