In order to help bridged-phy drivers to define init()/exit()
functions, define helper macro in gpbridge.h file.
Testing Done: Tested on gbsim.
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
#define gb_gpbridge_deregister(driver) \
gb_gpbridge_deregister_driver(driver)
+#define gb_gpbridge_builtin_driver(__driver) \
+ int __init gb_##__driver##_init(void) \
+{ \
+ return gb_gpbridge_register(&__driver); \
+} \
+void gb_##__driver##_exit(void) \
+{ \
+ gb_gpbridge_deregister(&__driver); \
+}
+
extern int gb_gpio_protocol_init(void);
extern void gb_gpio_protocol_exit(void);