linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	lm-sensors <lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Subject: Re: [PATCH 1/4] hwmon: (lm70) Simplify show_name function
Date: Sun, 16 Sep 2012 20:44:56 +0200	[thread overview]
Message-ID: <20120916204456.16a94b98@endymion.delvare> (raw)
In-Reply-To: <20120916161934.GB24858-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

On Sun, 16 Sep 2012 09:19:34 -0700, Guenter Roeck wrote:
> On Sun, Sep 16, 2012 at 03:09:01PM +0200, Jean Delvare wrote:
> > On Tue, 11 Sep 2012 13:52:50 -0700, Guenter Roeck wrote:
> > That's a very nice cleanup, but it makes me wonder...
> > 
> > Wouldn't it make sense to create the "name" attribute of spi devices at
> > the spi core level, as we do for i2c devices? All spi-based hwmon
> > drivers create the hwmon attributes as the spi device level, as is done
> > for i2c devices, so that would make no difference from a user-space
> > perspective. And this would avoid code redundancy.
> > 
> > If we don't want to do that, then let's offer drivers a nicer function
> > to retrieve the spi device name, e.g. spi_dev_name(). That way, the
> > internal implementation can change in the future without having to
> > update all drivers.
>
> Adding a "name" attribute would be great, but it is not used outside hwmon,
> and I am not sure if we want to impose that on other users.

That's correct, but OTOH we do exactly that for i2c devices and I am
not aware of anybody complaining about that so far.

> I am obviously fine with spi_dev_name().
> 
> Having said that, modalias is used heavily in SPI drivers, so my patches
> don't really do anything special.

OK, good to know. This certainly speaks in favor of at least
spi_dev_name(), but we can take your patches as is for the time being,
pending Grant's decision.

-- 
Jean Delvare

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html

  parent reply	other threads:[~2012-09-16 18:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1347396773-32108-1-git-send-email-linux@roeck-us.net>
     [not found] ` <1347396773-32108-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2012-09-16 13:09   ` [PATCH 1/4] hwmon: (lm70) Simplify show_name function Jean Delvare
     [not found]     ` <20120916150901.6df27a85-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-09-16 16:19       ` Guenter Roeck
     [not found]         ` <20120916161934.GB24858-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2012-09-16 18:44           ` Jean Delvare [this message]
     [not found]             ` <20120916204456.16a94b98-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-09-16 18:56               ` Guenter Roeck

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=20120916204456.16a94b98@endymion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).