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]
Message-ID: <20160111092553.GM14104@x1>
Date:	Mon, 11 Jan 2016 09:25:53 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	Chen-Yu Tsai <wens@...e.org>
Cc:	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Chen-Yu Tsai <wens@...s.tw>, devicetree@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-sunxi@...glegroups.com, Hans de Goede <hdegoede@...hat.com>,
	Mark Brown <broonie@...nel.org>,
	Andy Shevchenko <andy.shevchenko@...il.com>,
	Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v6 3/9] mfd: axp20x: use dev->driver->of_match_table in
 axp20x_match_device()

On Thu, 17 Dec 2015, Chen-Yu Tsai wrote:

> In axp20x_match_device(), match the of_device_id table bound to the
> device driver instead of pointing to axp20x_of_match directly. This
> will allow us to keep axp20x_match_device() unmodified when we expand
> the axp20x driver into multiple ones covering different interface
> types.
> 
> of_device_get_match_data() cannot be used here as we need to know if
> it failed to get a match, or if the match data value just happened to
> be 0, as it is for the AXP152.
> 
> Signed-off-by: Chen-Yu Tsai <wens@...e.org>
> ---
>  drivers/mfd/axp20x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Lee Jones <lee.jones@...aro.org>

> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index 685a78614f83..3e186f2dcac3 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
> @@ -613,7 +613,7 @@ static int axp20x_match_device(struct axp20x_dev *axp20x)
>  	const struct of_device_id *of_id;
>  
>  	if (dev->of_node) {
> -		of_id = of_match_device(axp20x_of_match, dev);
> +		of_id = of_match_device(dev->driver->of_match_table, dev);
>  		if (!of_id) {
>  			dev_err(dev, "Unable to match OF ID\n");
>  			return -ENODEV;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ