RE: [PATCH v2] iio: light: Adding driver for ISL29018 ALS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-10-05 at 14:36 -0700, Rhyland Klein wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@xxxxxxxxxxx]
> > > diff --git a/drivers/staging/iio/light/isl29018.c
> > b/drivers/staging/iio/light/isl29018.c
> > > +static int isl29018_chip_init(struct i2c_client *client)
> > > +{
> > > +	struct isl29018_chip *chip = i2c_get_clientdata(client);
> > > +	int status;
> > > +	int i;
> > > +	int new_adc_bit;
> > > +	unsigned int new_range;
> > > +
> > > +	for (i = 0; i < ARRAY_SIZE(chip->reg_cache); i++)
> > > +		chip->reg_cache[i] = 0;
> > memset?
> I could use memset, except this is only 4 registers = 32 bytes,
> so I don't think that is really worth it do you?

Your choice.  I don't care really.  I didn't look to
see how many elements were in chip->reg_cache.

I just noted it as whenever I see a loop initialization
like that, I think memset not loop.

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux