IIRC the most generally accepted way is to do
static inline bool gpio_is_valid(int pin)
{
/* whatever */
}
#define gpio_is_valid gpio_is_valid
in the platform code and
#ifndef gpio_is_valid
/* provide definition of gpio_is_valid */
#endif
in the generic code. This way, there's only one symbol to grep for.
Haavard
--