Re: [PATCH v3 2/3] iio:adc:imx: add Freescale Vybrid vf610 adc driver

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

 



On 11/26/2013 01:24 PM, Peter Meerwald wrote:
>> +static inline void vf610_adc_cfg_set(struct vf610_adc *info)
>> +{
> 
> why are some functions marked inline and others not?
> this function does not seem time critical

And the compiler knows much better which functions to (partially) inline and
which not, I think inline is mostly ignored by the compiler anyway, so yes,
it should be removed here.

>> +static int vf610_adc_reg_access(struct iio_dev *indio_dev,
>> +			unsigned reg, unsigned writeval,
>> +			unsigned *readval)
>> +{
>> +	struct vf610_adc *info = iio_priv(indio_dev);
>> +
>> +	if (readval == NULL)
>> +		return -EINVAL;
> 
> can this ever happen?
> 
> I'd rather check the value of reg

It is NULL when writing to a register.

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




[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