Changeset 3345
- Timestamp:
- 07/23/99 02:02:52 (9 years ago)
- Files:
-
- i2c/trunk/kernel/i2c-algo-bit.c (modified) (2 diffs)
- i2c/trunk/kernel/i2c-algo-pcf.c (modified) (2 diffs)
- i2c/trunk/kernel/i2c-core.c (modified) (5 diffs)
- i2c/trunk/kernel/i2c-dev.c (modified) (3 diffs)
- i2c/trunk/kernel/i2c-velleman.c (modified) (2 diffs)
- i2c/trunk/kernel/i2c.h (modified) (2 diffs)
- i2c/trunk/mkpatch/Makefile (modified) (1 diff)
- i2c/trunk/mkpatch/mkpatch.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
i2c/trunk/kernel/i2c-algo-bit.c
r3342 r3345 623 623 } 624 624 625 626 627 EXPORT_SYMBOL(i2c_bit_add_bus); 628 EXPORT_SYMBOL(i2c_bit_del_bus); 629 625 630 #ifdef MODULE 626 631 MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>"); … … 635 640 MODULE_PARM_DESC(i2c_debug,"debug level - 0 off; 1 normal; 2,3 more verbose; 9 bit-protocol"); 636 641 637 638 EXPORT_SYMBOL(i2c_bit_add_bus);639 EXPORT_SYMBOL(i2c_bit_del_bus);640 641 642 642 int init_module(void) 643 643 { i2c/trunk/kernel/i2c-algo-pcf.c
r3342 r3345 599 599 } 600 600 601 602 EXPORT_SYMBOL(i2c_pcf_add_bus); 603 EXPORT_SYMBOL(i2c_pcf_del_bus); 604 601 605 #ifdef MODULE 602 606 MODULE_AUTHOR("Hans Berglund <hb@spacetec.no>"); … … 612 616 613 617 614 EXPORT_SYMBOL(i2c_pcf_add_bus);615 EXPORT_SYMBOL(i2c_pcf_del_bus);616 617 618 618 int init_module(void) 619 619 { i2c/trunk/kernel/i2c-core.c
r3342 r3345 1153 1153 #ifndef MODULE 1154 1154 #ifdef CONFIG_I2C_CHARDEV 1155 extern int i2c dev_init(void);1155 extern int i2c_dev_init(void); 1156 1156 #endif 1157 1157 #ifdef CONFIG_I2C_ALGOBIT … … 1179 1179 1180 1180 1181 int simons_i2c_init(void)1181 int i2c_init_all(void) 1182 1182 { 1183 1183 /* --------------------- global ----- */ … … 1185 1185 1186 1186 #ifdef CONFIG_I2C_CHARDEV 1187 i2c dev_init();1187 i2c_dev_init(); 1188 1188 #endif 1189 1189 /* --------------------- bit -------- */ … … 1214 1214 1215 1215 1216 #ifdef MODULE1217 MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");1218 MODULE_DESCRIPTION("I2C-Bus main module");1219 MODULE_PARM(i2c_debug, "i");1220 MODULE_PARM_DESC(i2c_debug,"debug level");1221 1216 1222 1217 EXPORT_SYMBOL(i2c_add_algorithm); … … 1253 1248 EXPORT_SYMBOL(i2c_smbus_write_block_data); 1254 1249 1250 #ifdef MODULE 1251 MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>"); 1252 MODULE_DESCRIPTION("I2C-Bus main module"); 1253 MODULE_PARM(i2c_debug, "i"); 1254 MODULE_PARM_DESC(i2c_debug,"debug level"); 1255 1255 1256 int init_module(void) 1256 1257 { i2c/trunk/kernel/i2c-dev.c
r3342 r3345 110 110 static void i2cdev_dec_use(struct i2c_client *client); 111 111 112 static int i2cdev_init(void); 112 #ifdef MODULE 113 static 114 #else 115 extern 116 #endif 117 int __init i2c_dev_init(void); 113 118 static int i2cdev_cleanup(void); 114 119 … … 497 502 } 498 503 499 int __init i2c dev_init(void)504 int __init i2c_dev_init(void) 500 505 { 501 506 int res; … … 552 557 int init_module(void) 553 558 { 554 return i2c dev_init();559 return i2c_dev_init(); 555 560 } 556 561 i2c/trunk/kernel/i2c-velleman.c
r3342 r3345 193 193 MODULE_PARM(base, "i"); 194 194 195 EXPORT_NO_SYMBOLS; 196 195 197 int init_module(void) 196 198 { … … 205 207 206 208 #endif 207 208 209 210 211 212 213 i2c/trunk/kernel/i2c.h
r3341 r3345 489 489 #define I2C_MAJOR 89 /* Device major number */ 490 490 491 #ifdef __KERNEL__ 491 492 492 493 # if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) … … 511 512 # include <asm/errno.h> 512 513 # endif 514 515 #endif /* def __KERNEL__ */ 513 516 #endif /* I2C_H */ i2c/trunk/mkpatch/Makefile
r3344 r3345 27 27 28 28 ifeq ($(CONFIG_I2C_CHARDEV),y) 29 L X_OBJS += i2c-dev.o29 L_OBJS += i2c-dev.o 30 30 else 31 31 ifeq ($(CONFIG_I2C_CHARDEV),m) 32 M X_OBJS += i2c-dev.o32 M_OBJS += i2c-dev.o 33 33 endif 34 34 endif i2c/trunk/mkpatch/mkpatch.pl
r3344 r3345 59 59 $_ = <INPUT> while not m@endif@; 60 60 $_ = <INPUT>; 61 $_ = <INPUT> if m@^$@; 61 62 } 62 63 if (m@include arch/\$\(ARCH\)/Makefile@) { … … 98 99 $i2c_present = 1 if m@i2c@; 99 100 s@$@ i2c@ if (not $i2c_present); 100 } elsif (m@CONFIG_I2C@) { 101 } 102 if (m@CONFIG_I2C@) { 101 103 $_ = <INPUT> while not m@^endif@; 102 104 $_ = <INPUT>; 103 } elsif (m@^include \$\(TOPDIR\)/Rules.make$@) { 105 $_ = <INPUT> if m@^$@; 106 } 107 if (m@^include \$\(TOPDIR\)/Rules.make$@) { 104 108 print OUTPUT <<'EOF'; 105 109 ifeq ($(CONFIG_I2C),y) … … 136 140 or die "Can't open $package_root/$package_file"; 137 141 while(<INPUT>) { 138 $_ = <INPUT> if (m@i2c@); 142 if (m@i2c@) { 143 $_ = <INPUT>; 144 $_ = <INPUT> if (m@^$@); 145 } 139 146 if ($ready and not $done and (m@^mainmenu_option@ or m@CONFIG_APM@)) { 140 147 $done = 1; 141 148 print OUTPUT <<'EOF'; 142 #143 # i2c bus stuff144 #145 149 source drivers/i2c/Config.in 146 150 … … 165 169 my $right_place = 0; 166 170 my $with_video = 0; 167 168 open INPUT,"$kernel_root/$kernel_file" 169 or die "Can't open `$kernel_root/$kernel_file'"; 170 open OUTPUT,">$package_root/mkpatch/.temp" 171 or die "Can't open $package_root/$package_file"; 172 while(<INPUT>) { 173 if ($right_place and m@CONFIG_I2C@) { 171 my $done = 0; 172 my $atstart = 1; 173 174 open INPUT,"$kernel_root/$kernel_file" 175 or die "Can't open `$kernel_root/$kernel_file'"; 176 open OUTPUT,">$package_root/mkpatch/.temp" 177 or die "Can't open $package_root/$package_file"; 178 while(<INPUT>) { 179 if ($atstart and m@#ifdef@) { 180 print OUTPUT << 'EOF'; 181 #ifdef CONFIG_I2C 182 extern void i2c_init_all(void); 183 #endif 184 EOF 185 $atstart = 0; 186 } 187 if (not $right_place and m@CONFIG_I2C@) { 174 188 $_ = <INPUT> while not m@#endif@; 175 189 $_ = <INPUT>; 176 190 } 177 if(m@^#ifdef CONFIG_VIDEO_BT848$@) { 178 s@$@ || CONFIG_I2C@ if not m@CONFIG_i2C@; 179 $with_video = 1; 180 } elsif (m@^#ifdef CONFIG_VIDEO_BT848 || CONFIG_I2C@) { 181 $with_video = 1; 182 } elsif (m@lp_init\(\);@) { 183 $right_place = 1; 184 } elsif ($right_place and not $with_video and m@return 0;@) { 185 print OUTPUT <<'EOF'; 186 #ifdef CONFIG_I2C 187 i2c_init(); 191 $with_video = 1 if m@CONFIG_VIDEO_BT848@; 192 $right_place = 1 if (m@lp_init\(\);@); 193 if ($right_place and not $done and 194 (m@CONFIG_I2C@ or m@CONFIG_VIDEO_BT848@ or m@return 0;@)) { 195 if (not m@return 0;@) { 196 $_ = <INPUT> while not m@#endif@; 197 $_ = <INPUT>; 198 $_ = <INPUT> if m@^$@; 199 } 200 if ($with_video) { 201 print OUTPUT '#if defined(CONFIG_I2C) || defined(CONFIG_VIDEO_BT848)'; 202 } else { 203 print OUTPUT '#ifdef CONFIG_I2C'; 204 } 205 print OUTPUT <<'EOF'; 206 207 i2c_init_all(); 188 208 #endif 189 209 190 210 EOF 211 $done = 1; 191 212 } 192 213 print OUTPUT;
