lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Dec 2022 12:57:36 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Hanna Hawa <hhhawa@...zon.com>
Cc:     wsa@...nel.org, linus.walleij@...aro.org,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org, dwmw@...zon.co.uk, benh@...zon.com,
        ronenk@...zon.com, talel@...zon.com, jonnyc@...zon.com,
        hanochu@...zon.com, farbere@...zon.com, itamark@...zon.com
Subject: Re: [PATCH v3 1/1] i2c: Set pinctrl recovery info to device pinctrl

On Mon, Dec 19, 2022 at 07:32:28PM +0000, Hanna Hawa wrote:
> Currently the i2c subsystem rely on the controller device tree to
> initialize the pinctrl recovery information, part of the drivers does
> not set this field (rinfo->pinctrl), for example i2c designware driver.
> 
> The pins information is saved part of the device structure before probe
> and it's done on pinctrl_bind_pins().
> 
> Make the i2c init recovery to get the device pins if it's not
> initialized by the driver from the device pins.
> 
> Added new API to get the device pinctrl.

...

> -	struct pinctrl *p = bri->pinctrl;
> +	struct pinctrl *p;
> +
> +	if (!bri->pinctrl)
> +		bri->pinctrl = dev_pinctrl(dev->parent);
> +	p = bri->pinctrl;

As I said, you may use Elvis here as well.

	bri->pinctrl = bri->pinctrl ?: dev_pinctrl(...);
	p = bri->pinctrl;

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ