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]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux