[PATCH v15 09/13] counter: Implement signalZ_action_component_id sysfs attribute

Jonathan Cameron jic23 at kernel.org
Sun Aug 15 09:57:56 PDT 2021


On Mon,  9 Aug 2021 21:37:34 +0900
William Breathitt Gray <vilhelm.gray at gmail.com> 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 at chromium.org>
> Cc: Dan Carpenter <dan.carpenter at oracle.com>
> Reviewed-by: David Lechner <david at lechnology.com>
> Signed-off-by: William Breathitt Gray <vilhelm.gray at gmail.com>
> ---

>  Contact:	linux-iio at vger.kernel.org
> 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;
>  }
>  



More information about the linux-arm-kernel mailing list