All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 4/4] hwmon: (ad7314) Add 'name' sysfs attribute
Date: Tue, 18 Sep 2012 20:10:48 +0000	[thread overview]
Message-ID: <5058D548.2050801@kernel.org> (raw)
In-Reply-To: <1347396773-32108-4-git-send-email-linux@roeck-us.net>

On 09/17/2012 05:38 PM, Guenter Roeck wrote:
> ping
> 
> On Tue, Sep 11, 2012 at 01:52:53PM -0700, Guenter Roeck wrote:
>> The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
>> in this driver.
Sorry, completely forgot about this.

Acked-by: Jonathan Cameron <jic23@kernel.org>
>>
>> Cc: Jonathan Cameron <jic23@cam.ac.uk>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>> candidate for -stable
>>
>>  drivers/hwmon/ad7314.c |    8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/hwmon/ad7314.c b/drivers/hwmon/ad7314.c
>> index 455294f..37c01e7 100644
>> --- a/drivers/hwmon/ad7314.c
>> +++ b/drivers/hwmon/ad7314.c
>> @@ -87,10 +87,18 @@ static ssize_t ad7314_show_temperature(struct device *dev,
>>  	}
>>  }
>>  
>> +static ssize_t ad7314_show_name(struct device *dev,
>> +				struct device_attribute *devattr, char *buf)
>> +{
>> +	return sprintf(buf, "%s\n", to_spi_device(dev)->modalias);
>> +}
>> +
>> +static DEVICE_ATTR(name, S_IRUGO, ad7314_show_name, NULL);
>>  static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO,
>>  			  ad7314_show_temperature, NULL, 0);
>>  
>>  static struct attribute *ad7314_attributes[] = {
>> +	&dev_attr_name.attr,
>>  	&sensor_dev_attr_temp1_input.dev_attr.attr,
>>  	NULL,
>>  };
>> -- 
>> 1.7.9.7
>>
>>

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

      parent reply	other threads:[~2012-09-18 20:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 20:52 [lm-sensors] [PATCH 4/4] hwmon: (ad7314) Add 'name' sysfs attribute Guenter Roeck
2012-09-17 16:38 ` Guenter Roeck
2012-09-17 19:07 ` Jean Delvare
2012-09-18 20:10 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5058D548.2050801@kernel.org \
    --to=jic23@kernel.org \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.