Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965057Ab3GEPQZ (ORCPT ); Fri, 5 Jul 2013 11:16:25 -0400 Received: from mail-ie0-f180.google.com ([209.85.223.180]:38721 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964960Ab3GEPQY (ORCPT ); Fri, 5 Jul 2013 11:16:24 -0400 MIME-Version: 1.0 In-Reply-To: <51D24318.40908@atmel.com> References: <1372667978-4718-1-git-send-email-richard.genoud@gmail.com> <1372667978-4718-3-git-send-email-richard.genoud@gmail.com> <51D24318.40908@atmel.com> From: Richard Genoud Date: Fri, 5 Jul 2013 17:16:03 +0200 Message-ID: Subject: Re: [RFC PATCH 02/13] misc: atmel_ssc: keep the count of pdev->id To: Bo Shen Cc: devicetree-discuss@lists.ozlabs.org, Nicolas Ferre , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1164 Lines: 42 2013/7/2 Bo Shen : > Hi Richard, > > > On 7/1/2013 16:39, Richard Genoud wrote: >> >> With device tree, pdev->id is always -1, so we introduce a local >> counter. >> >> Signed-off-by: Richard Genoud >> --- >> drivers/misc/atmel-ssc.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c >> index 3afbd82..d1ec5ab 100644 >> --- a/drivers/misc/atmel-ssc.c >> +++ b/drivers/misc/atmel-ssc.c >> @@ -173,6 +173,12 @@ out: >> return err; >> } >> >> +/* counter of ssc devive instances. >> + * With device tree pdev->id is always -1, so we have to keep the >> + * count ourselves >> + */ >> +static int ssc_device_id; > > > Do we really need this? If Yes, would it better to get from device through > of_alias_get_id? you're right, it seems that we don't need that anymore. thanks ! Richard. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/