linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Albrecht Dreß" <albrecht.dress-KvP5wT2u2U0@public.gmane.org>,
	"Eric W. Biederman"
	<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH] misc/eeprom/at24: init dynamic bin_attribute structures
Date: Thu, 11 Mar 2010 11:54:26 +0100	[thread overview]
Message-ID: <20100311115426.6440837c@hyperion.delvare> (raw)
In-Reply-To: <20100311080347.GB16219-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

On Thu, 11 Mar 2010 09:03:47 +0100, Wolfram Sang wrote:
> Hi Jean,
> 
> > > diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> > > index 88c20da..d2deea4 100644
> > > --- a/drivers/misc/eeprom/at24.c
> > > +++ b/drivers/misc/eeprom/at24.c
> > > @@ -541,6 +541,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
> > >  	at24->bin.attr.mode = chip.flags & AT24_FLAG_IRUGO ? S_IRUGO : S_IRUSR;
> > >  	at24->bin.read = at24_bin_read;
> > >  	at24->bin.size = chip.byte_len;
> > > +	sysfs_bin_attr_init(&at24->bin);
> > 
> > I think it would make more sense to move the initialization _before_
> > manually setting other struct members. You don't know what
> > sysfs_bin_attr_init does or will do in the future.
> 
> Okay.

OK, patch applied with this change, thanks.

> > I presume the at25 driver needs the same fix?
> 
> Yes, sent it to the SPI-list sperately. I wasn't sure if a patch series would
> ease or complicate things.

Fine with me, as long as it get fixed.

-- 
Jean Delvare

  parent reply	other threads:[~2010-03-11 10:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-11  0:55 [PATCH] misc/eeprom/at24: init dynamic bin_attribute structures Wolfram Sang
     [not found] ` <1268268932-23447-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-11  7:58   ` Jean Delvare
     [not found]     ` <20100311085835.34c6cd51-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-03-11  8:03       ` Wolfram Sang
     [not found]         ` <20100311080347.GB16219-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-11 10:54           ` Jean Delvare [this message]
     [not found]             ` <20100311115426.6440837c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-03-11 11:23               ` Wolfram Sang
     [not found]                 ` <20100311112321.GA28805-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-11 14:57                   ` Jean Delvare
     [not found]                     ` <20100311155753.25fc9a5c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-03-12  7:12                       ` Wolfram Sang
2010-03-11 18:21   ` Albrecht Dreß
2010-03-12  0:12     ` Wolfram Sang

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=20100311115426.6440837c@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=albrecht.dress-KvP5wT2u2U0@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@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).