From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754699Ab0IOVjO (ORCPT ); Wed, 15 Sep 2010 17:39:14 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:48752 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754286Ab0IOVjM convert rfc822-to-8bit (ORCPT ); Wed, 15 Sep 2010 17:39:12 -0400 From: "Savoy, Pavan" To: "Savoy, Pavan" , "gregkh@suse.de" , "alan@lxorguk.ukuu.org.uk" CC: "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Date: Thu, 16 Sep 2010 03:08:51 +0530 Subject: RE: [PATCH] drivers:staging:ti-st: fix kim platform device id Thread-Topic: [PATCH] drivers:staging:ti-st: fix kim platform device id Thread-Index: ActRGKcQ5fnZWvv1Rd291nEHmNzlaACdoUJgAGOtkRA= Message-ID: <19F8576C6E063C45BE387C64729E73940468913CCA@dbde02.ent.ti.com> References: <1284148738-21643-1-git-send-email-pavan_savoy@ti.com> <1284148738-21643-2-git-send-email-pavan_savoy@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Greg, Any updates? Please ... Please find some time to have a look at it!! Alan, Please have a look at it too. I've dealt with most of the comments, device context has been provided, spin-locks have been reviewed and documented multiple devices also can be easily supported if required. > -----Original Message----- > From: Savoy, Pavan > Sent: Monday, September 13, 2010 5:02 PM > To: gregkh@suse.de; alan@lxorguk.ukuu.org.uk > Cc: devel@driverdev.osuosl.org; linux-kernel@vger.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@suse.de; alan@lxorguk.ukuu.org.uk > > Cc: devel@driverdev.osuosl.org; linux-kernel@vger.kernel.org; Savoy, Pavan > > Subject: [PATCH] drivers:staging:ti-st: fix kim platform device id > > > > From: Pavan Savoy > > > > 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 > > --- > > 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