initial_pins: Add check to reduce compile time size when not in use
Add a check to the start of initial_pins_setup() to make it easier for gcc to optimize the code if it is not in use. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
0c43ae1fd4
commit
3c1ed3bb27
|
@ -16,6 +16,8 @@ DECL_CTR("DECL_INITIAL_PINS " __stringify(CONFIG_INITIAL_PINS));
|
|||
void
|
||||
initial_pins_setup(void)
|
||||
{
|
||||
if (sizeof(CONFIG_INITIAL_PINS) <= 1)
|
||||
return;
|
||||
int i;
|
||||
for (i=0; i<initial_pins_size; i++) {
|
||||
const struct initial_pin_s *ip = &initial_pins[i];
|
||||
|
|
Loading…
Reference in New Issue