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:	Thu, 13 Nov 2014 11:57:50 +0100
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	Roger Quadros <rogerq@...com>, wg@...ndegger.com
CC:	wsa@...-dreams.de, tony@...mide.com, tglx@...utronix.de,
	mugunthanvnm@...com, george.cherian@...com, balbi@...com,
	nsekhar@...com, nm@...com, sergei.shtylyov@...entembedded.com,
	linux-omap@...r.kernel.org, linux-can@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH v4 2/8] net: can: c_can: Introduce c_can_driver_data structure

On 11/07/2014 03:49 PM, Roger Quadros wrote:
> We want to have more data than just can_dev_id to be present
> in the driver data e.g. TI platforms need RAMINIT register
> description. Introduce the c_can_driver_data structure and move
> the can_dev_id into it.
> 
> Tidy up the way it is used on probe().
> 
> Signed-off-by: Roger Quadros <rogerq@...com>

[...]

> @@ -198,21 +206,19 @@ static int c_can_plat_probe(struct platform_device *pdev)
>  	struct net_device *dev;
>  	struct c_can_priv *priv;
>  	const struct of_device_id *match;
> -	const struct platform_device_id *id;
>  	struct resource *mem, *res;
>  	int irq;
>  	struct clk *clk;
> -
> -	if (pdev->dev.of_node) {
> -		match = of_match_device(c_can_of_table, &pdev->dev);
> -		if (!match) {
> -			dev_err(&pdev->dev, "Failed to find matching dt id\n");
> -			ret = -EINVAL;
> -			goto exit;
> -		}
> -		id = match->data;
> +	const struct c_can_driver_data *drvdata;
> +
> +	match = of_match_device(c_can_of_table, &pdev->dev);
> +	if (match) {
> +		drvdata = match->data;
> +	} else if (pdev->id_entry->driver_data) {
> +		drvdata = (struct c_can_driver_data *)
> +			   pdev->id_entry->driver_data;
                           ^^^^^^^^^^^^^^
I've changes this to platform_get_device_id() while aplying.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ