From: Wolfgang Denk Date: Sun, 07 Nov 2010 22:38:45 +0100 Subject: [U-Boot] [PATCH] BeagleBoard: Added LED driver In-Reply-To: References: <1288936393-30650-1-git-send-email-jkridner@beagleboard.org> Message-ID: <20101107213845.69AC81524F3@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Jason Kridner, In message you wrote: > > > [sp] I see too many ifdef blocks in the code above. The also seems to be > > repetitive. > > > > Is user really expected to change the u-boot config for each LED > bit/color? > > This is the existing architecture in status_led.h. I want to make > sure this code compiles no matter which of the defines have been set. > > > Can this be simplified by one function that takes an argument? > > Do you mean set vs. toggle? I think that would be great too, but > again following an existing definition. Please don;t stick with bad examples just because they exist. Please feel free to come up ith an improvement. If you have time and resources, please feel free to clean up the status_led code as well. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Don't panic.