Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753780Ab0HZSiw (ORCPT ); Thu, 26 Aug 2010 14:38:52 -0400 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:49026 "EHLO opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753536Ab0HZSiv (ORCPT ); Thu, 26 Aug 2010 14:38:51 -0400 Date: Thu, 26 Aug 2010 19:38:50 +0100 From: Mark Brown To: Anton Vorontsov Cc: Andrew Morton , Samuel Ortiz , David Brownell , linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: Add generic driver for simple memory mapped controllers Message-ID: <20100826183850.GB24381@opensource.wolfsonmicro.com> References: <20100825194249.GA453@oksana.dev.rtsoft.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100825194249.GA453@oksana.dev.rtsoft.ru> X-Cookie: You will soon forget this. User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 616 Lines: 14 On Wed, Aug 25, 2010 at 11:42:49PM +0400, Anton Vorontsov wrote: > + res_dat = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + if (!res_dat) > + return -EINVAL; I'd suggest naming these resources rather than grabbing by number, that'll make it easier to plumb the machine driver side in since you don't have to remember which number corresponds to which function. -- 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/