public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Timur Tabi <timur@freescale.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Add a private_data pointer to struct device_attribute
Date: Fri, 16 Nov 2007 17:06:08 -0800	[thread overview]
Message-ID: <20071117010608.GC13659@suse.de> (raw)
In-Reply-To: <11952582603203-git-send-email-timur@freescale.com>

On Fri, Nov 16, 2007 at 06:11:00PM -0600, Timur Tabi wrote:
> A private data pointer in struct device_attribute allows the 'show' and 'store'
> functions to access instance data.  This handy in situations where the
> driver_data and platform_data pointers of 'struct device' are already used
> for other purposes.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> 
> Greg, can you tell me if you think this patch is a good idea?  It doesn't
> appear to do any harm, and I'm working on an ALSA driver that could benefit
> for this patch.  I think 2.6.25 would be a good target.

Huh?  Why is this needed?  Can you give me a usage case for it?  Why
would you just not use the pointer to the attribute itself to identify
it?  All device specific information should be stored in the struct
device structure, as that is what describes the device, not the
attribute.

confused,

greg k-h

  reply	other threads:[~2007-11-17  1:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-17  0:11 Add a private_data pointer to struct device_attribute Timur Tabi
2007-11-17  1:06 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-11-17  1:15 Mikael Pettersson
2007-11-17 14:02 ` Timur Tabi

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=20071117010608.GC13659@suse.de \
    --to=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=timur@freescale.com \
    /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