From: Mike Frysinger Date: Tue, 22 Nov 2011 17:18:11 -0500 Subject: [U-Boot] [PATCH] M28: Added pin name support in GPIO driver In-Reply-To: <7E702972-7AC1-40E4-BBBD-C81AA3D81359@delien.nl> References: <201111222032.32956.marek.vasut@gmail.com> <7E702972-7AC1-40E4-BBBD-C81AA3D81359@delien.nl> Message-ID: <201111221718.12738.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 22 November 2011 15:49:06 Robert Deli?n wrote: > Of course name_to_gpio could be a non-static function, allowing it to be > used by other parts of the code too. And for that reason do_gpio could be > non-static too. But that would still require an ifdef-orgy like this to > make it work for different diversities: no it doesn't. you can have it be an external function in the gpio.c file like Marek wants, and then the header simply does: extern int name_to_gpio(unsigned gpio); #define name_to_gpio(gpio) name_to_gpio(gpio) -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: