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, 9 Jan 2018 10:19:46 +0100
From:   Sebastian Reichel <sebastian.reichel@...labora.co.uk>
To:     Keerthy <j-keerthy@...com>
Cc:     daniel.lezcano@...aro.org, thierry.reding@...il.com,
        tony@...mide.com, aaro.koskinen@....fi,
        Claudiu.Beznea@...rochip.com, narmstrong@...libre.com,
        linux-pwm@...r.kernel.org, ladis@...ux-mips.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-omap@...r.kernel.org, robh+dt@...nel.org, t-kristo@...com,
        grygorii.strashko@...com
Subject: Re: [PATCH v7 7/9] clocksource: timer-dm: Hook device platform data
 if not already assigned

Hi,

On Tue, Jan 09, 2018 at 11:53:05AM +0530, Keerthy wrote:
> From: Ladislav Michl <ladis@...ux-mips.org>
> 
> In the case of device tree boot the device platform data is usually
> NULL so hook the platform data obtained from the match.
> As part of un-constify the platform_data pointer.
> 
> Signed-off-by: Ladislav Michl <ladis@...ux-mips.org>
> Signed-off-by: Keerthy <j-keerthy@...com>

Reviewed-by: Sebastian Reichel <sebastian.reichel@...labora.co.uk>

-- Sebastian

> ---
>  drivers/clocksource/timer-dm.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-dm.c b/drivers/clocksource/timer-dm.c
> index 1cbd954..60db173 100644
> --- a/drivers/clocksource/timer-dm.c
> +++ b/drivers/clocksource/timer-dm.c
> @@ -806,14 +806,16 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
>  	struct omap_dm_timer *timer;
>  	struct resource *mem, *irq;
>  	struct device *dev = &pdev->dev;
> -	const struct of_device_id *match;
>  	const struct dmtimer_platform_data *pdata;
>  	int ret;
>  
> -	match = of_match_device(of_match_ptr(omap_timer_match), dev);
> -	pdata = match ? match->data : dev->platform_data;
> +	pdata = of_device_get_match_data(dev);
> +	if (!pdata)
> +		pdata = dev_get_platdata(dev);
> +	else
> +		dev->platform_data = (void *)pdata;
>  
> -	if (!pdata && !dev->of_node) {
> +	if (!pdata) {
>  		dev_err(dev, "%s: no platform data.\n", __func__);
>  		return -ENODEV;
>  	}
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ