Re: [PATCH v6 1/2] Driver for TI HDC20x0 humidity and temperature sensors

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

 



On Mon, 23 Mar 2020 14:39:34 +0000
Eugene Zalkonnikov <ez@xxxxxxxxxxxxx> wrote:

> Hi Jonathan,
> 
> > On 22 Mar 2020, at 17:17, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:  
> >> +static int hdc2010_write_raw(struct iio_dev *indio_dev,
> >> +			     struct iio_chan_spec const *chan,
> >> +			     int val, int val2, long mask)
> >> +{
> >> +	struct hdc2010_data *data = iio_priv(indio_dev);
> >> +	int new, ret = -EINVAL;  
> > 
> > Unless I'm half asleep (which is possible :) ret is always
> > written below before being used.  Hence this init isn't needed.
> >   
> I suspect it’s a vestige from before all stylistic rewrites in recent patches. 
> Same for the shared returns. Will change that.
> 
> >> +
> >> +	indio_dev->dev.parent = &client->dev;
> >> +	indio_dev->name = dev_name(&client->dev);  
> > 
> > That should be the part number.  IIRC that's not what you'll get
> > from dev_name called on the i2c device.  Note we let a few of
> > these in in the past and are now stuck with them... 
> >   
> My access to actual hw is limited now, so to reduce the iterations here: what
> is going to be a suitable device name? Would “hdc20x0” do? “hdc2010”?
Should match the part so hdc2010 or hdc2080 as appropriate. No wild cards.
> 
> 
> Regards,
>   Eugene.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux