Re: [PATCH 01/12] iio:dac:ad5755: Switch to generic firmware properties.

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

 



On Sun, 28 Nov 2021 20:40:33 +0100
Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:

> On 11/28/21 8:26 PM, Jonathan Cameron wrote:
> >   static int ad5755_probe(struct spi_device *spi)
> >   {
> > @@ -751,8 +736,8 @@ static int ad5755_probe(struct spi_device *spi)
> >   
> >   	mutex_init(&st->lock);
> >   
> > -	if (spi->dev.of_node)
> > -		pdata = ad5755_parse_dt(&spi->dev);
> > +	if (dev_fwnode(&spi->dev))
> > +		pdata = ad5755_parse_fw(&spi->dev);
> >   	else
> >   		pdata = spi->dev.platform_data;  
> Considering that it is possible to supply fw_node data through platform 
> files we as well just completely drop platform_data support. And make 
> the platform data struct local to this file.
> 
Good point.  I'm in two minds about whether there is any advantage in
leaving the enum definitions in the platform_data header.

They aren't used in the dt binding (which includes an unrelated header - I'll
fix that as well..), so I'm not sure what the logic of exposing them for other
firmware bindings would be...

I'll squash them directly into the c file for now and we can always put them
back in a header if it turns out someone needs them later.

Jonathan




[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