Re: [PATCH v3 04/10] serial: 8250: dw: Create a more generic platform data structure

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

 



On Tue, Mar 29, 2022 at 05:24:24PM +0200, Miquel Raynal wrote:
> Before adding more platform data information, let's turn the quirks
> information as being a member of a wider structure. More fields will be
> added later.

>  	struct device_node *np = p->dev->of_node;
> -	unsigned int quirks = (unsigned int)device_get_match_data(p->dev);
> +	const struct dw8250_platform_data *pdata = device_get_match_data(p->dev);
> +	unsigned int quirks = pdata ? pdata->quirks : 0;

I remember Greg is not fan of ternary operators. Taking into account my
suggestion in the next patch, I think this can simply become

	unsigned int quirks = data->pdata.quirks;

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux