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: <19F8576C6E063C45BE387C64729E739404689135FB@dbde02.ent.ti.com>
Date:	Tue, 14 Sep 2010 03:31:55 +0530
From:	"Savoy, Pavan" <pavan_savoy@...com>
To:	"gregkh@...e.de" <gregkh@...e.de>,
	"alan@...rguk.ukuu.org.uk" <alan@...rguk.ukuu.org.uk>
CC:	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] drivers:staging:ti-st: fix kim platform device id

Greg,

 
----------------
Thanks & Regards,
Pavan Savoy | x0099669
 
> -----Original Message-----
> From: Savoy, Pavan
> Sent: Friday, September 10, 2010 2:59 PM
> To: gregkh@...e.de; alan@...rguk.ukuu.org.uk
> Cc: devel@...verdev.osuosl.org; linux-kernel@...r.kernel.org; Savoy, Pavan
> Subject: [PATCH] drivers:staging:ti-st: fix kim platform device id
> 
> From: Pavan Savoy <pavan_savoy@...com>
> 
> Platform devices tend to have id as -1 when only 1 device exist and
> a value >=0 when multiple devices exist, since we plan to store all
> these platform devices if multiple exist, there was a requirement to
> have id to be >=0.
> The patch fixes this problem.

Please merge this patch, and I hope you find some time to review the rest of them.


> Signed-off-by: Pavan Savoy <pavan_savoy@...com>
> ---
>  drivers/staging/ti-st/st_kim.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/ti-st/st_kim.c b/drivers/staging/ti-st/st_kim.c
> index 9e99463..be18c7a 100644
> --- a/drivers/staging/ti-st/st_kim.c
> +++ b/drivers/staging/ti-st/st_kim.c
> @@ -638,7 +638,14 @@ static int kim_probe(struct platform_device *pdev)
>  	long *gpios = pdev->dev.platform_data;
>  	struct kim_data_s	*kim_gdata;
> 
> -	st_kim_devices[pdev->id] = pdev;
> +	if ((pdev->id != -1) && (pdev->id < MAX_ST_DEVICES)) {
> +		/* multiple devices could exist */
> +		st_kim_devices[pdev->id] = pdev;
> +	} else {
> +		/* platform's sure about existance of 1 device */
> +		st_kim_devices[0] = pdev;
> +	}
> +
>  	kim_gdata = kzalloc(sizeof(struct kim_data_s), GFP_ATOMIC);
>  	if (!kim_gdata) {
>  		pr_err("no mem to allocate");
> --
> 1.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ