diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2007-10-17 17:26:54 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2007-10-17 17:26:54 +0000 |
commit | b9d4c5eca70160ef771fd764eccba95b44378ab4 (patch) | |
tree | 207320ddb2c4a39b67cc9bf39b9347e03e71436f /target/linux/adm5120/files/drivers/i2c | |
parent | c0579b390940042de3933309125b15f92e65012c (diff) | |
download | master-187ad058-b9d4c5eca70160ef771fd764eccba95b44378ab4.tar.gz master-187ad058-b9d4c5eca70160ef771fd764eccba95b44378ab4.tar.bz2 master-187ad058-b9d4c5eca70160ef771fd764eccba95b44378ab4.zip |
[adm5120] fix initcall level in i2c-gpio-custom driver if not built as a module
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9341 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120/files/drivers/i2c')
-rw-r--r-- | target/linux/adm5120/files/drivers/i2c/busses/i2c-gpio-custom.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/target/linux/adm5120/files/drivers/i2c/busses/i2c-gpio-custom.c b/target/linux/adm5120/files/drivers/i2c/busses/i2c-gpio-custom.c index 9d62a2d909..36a8bf0e37 100644 --- a/target/linux/adm5120/files/drivers/i2c/busses/i2c-gpio-custom.c +++ b/target/linux/adm5120/files/drivers/i2c/busses/i2c-gpio-custom.c @@ -144,7 +144,7 @@ err: return err; } -static int __init i2c_gpio_custom_init(void) +static int __init i2c_gpio_custom_probe(void) { int err; @@ -174,6 +174,12 @@ err: i2c_gpio_custom_cleanup(); return err; } + +#ifdef MODULE +static int __init i2c_gpio_custom_init(void) +{ + return i2c_gpio_custom_probe(); +} module_init(i2c_gpio_custom_init); static void __exit i2c_gpio_custom_exit(void) @@ -181,10 +187,11 @@ static void __exit i2c_gpio_custom_exit(void) i2c_gpio_custom_cleanup(); } module_exit(i2c_gpio_custom_exit); - +#else +subsys_initcall(i2c_gpio_custom_probe); +#endif /* MODULE*/ MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org >"); MODULE_DESCRIPTION(DRV_DESC); MODULE_VERSION(DRV_VERSION); - |