All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c
@ 2002-09-15 22:36 Albert Cranford
  2002-09-15 23:00 ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Albert Cranford @ 2002-09-15 22:36 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Kernel mailing list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 484 bytes --]

Hello Linus,
New I2C drivers that have been adjusted after Russell King comments of August.
o i2c-algo-8xx.c
o i2c-pport.c
o i2c-adap-ibm_ocp.c
o i2c-pcf-epp.c
o Add new drivers to Config.in and Makefile.
o Add new drivers to i2c-core for initialization.
o Remove EXPORT_NO_SYMBOLS statement from i2c-dev, i2c-elektor and i2c-frodo.
o Cleanup init_module and cleanup_module adding __init and __exit to most drivers.
o Adjust i2c-elektor with cli/sti replacement.
-- 
ac9410@attbi.com

[-- Attachment #2: Type: TEXT/PLAIN, Size: 6504 bytes --]

--- /dev/null	1994-07-17 19:46:18.000000000 -0400
+++ linux-2.5.34/drivers/i2c/i2c-pport.c	2001-10-13 14:09:01.000000000 -0400
@@ -0,0 +1,252 @@
+/* ------------------------------------------------------------------------- */
+/* i2c-pport.c i2c-hw access  for primitive i2c par. port adapter	     */
+/* ------------------------------------------------------------------------- */
+/*   Copyright (C) 2001    Daniel Smolik
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.		     */
+/* ------------------------------------------------------------------------- */
+
+/*
+	See doc/i2c-pport for instructions on wiring to the
+	parallel port connector.
+
+	Cut & paste :-)  based on Velleman K9000 driver by Simon G. Vogl
+*/
+
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/delay.h>
+#include <linux/slab.h>
+#include <linux/version.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+#include <linux/ioport.h>
+#include <asm/io.h>
+#include <linux/errno.h>
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("GPL");
+#endif
+
+#define DEFAULT_BASE 0x378
+static int base=0;
+static unsigned char PortData = 0;
+
+/* ----- global defines -----------------------------------------------	*/
+#define DEB(x)		/* should be reasonable open, close &c. 	*/
+#define DEB2(x) 	/* low level debugging - very slow 		*/
+#define DEBE(x)	x	/* error messages 				*/
+#define DEBINIT(x) x	/* detection status messages			*/
+
+/* --- Convenience defines for the parallel port:			*/
+#define BASE	(unsigned int)(data)
+#define DATA	BASE			/* Centronics data port		*/
+#define STAT	(BASE+1)		/* Centronics status port	*/
+#define CTRL	(BASE+2)		/* Centronics control port	*/
+
+/* we will use SDA  - Auto Linefeed(14)   bit 1  POUT   */
+/* we will use SCL - Initialize printer(16)    BUSY bit 2*/
+
+#define  SET_SCL    | 0x04
+#define  CLR_SCL    & 0xFB
+
+
+
+
+#define  SET_SDA    & 0x04
+#define  CLR_SDA    | 0x02
+
+
+/* ----- local functions ----------------------------------------------	*/
+
+
+static void bit_pport_setscl(void *data, int state)
+{
+	if (state) {
+		//high
+		PortData = PortData SET_SCL;
+	} else {
+		//low
+		PortData = PortData CLR_SCL; 
+	}
+	outb(PortData, CTRL);
+}
+
+static void bit_pport_setsda(void *data, int state)
+{
+	if (state) {
+		
+		PortData = PortData SET_SDA;
+	} else {
+
+		PortData = PortData CLR_SDA;
+	}
+	outb(PortData, CTRL);
+} 
+
+static int bit_pport_getscl(void *data)
+{
+
+	return ( 4 == ( (inb_p(CTRL)) & 0x04 ) );
+}
+
+static int bit_pport_getsda(void *data)
+{
+	return ( 0 == ( (inb_p(CTRL)) & 0x02 ) );
+}
+
+static int bit_pport_init(void)
+{
+	//release_region( (base+2) ,1);
+
+	if (check_region((base+2),1) < 0 ) {
+		return -ENODEV;	
+	} else {
+
+		/* test for PPORT adap. 	*/
+	
+
+		PortData=inb(base+2);
+		PortData= (PortData SET_SDA) SET_SCL;
+		outb(PortData,base+2);				
+
+		if (!(inb(base+2) | 0x06)) {	/* SDA and SCL will be high	*/
+			DEBINIT(printk("i2c-pport.o: SDA and SCL was low.\n"));
+			return -ENODEV;
+		} else {
+		
+			/*SCL high and SDA low*/
+			PortData = PortData SET_SCL CLR_SDA;
+			outb(PortData,base+2);	
+			udelay(400);
+			if ( !(inb(base+2) | 0x4) ) {
+				//outb(0x04,base+2);
+				DEBINIT(printk("i2c-port.o: SDA was high.\n"));
+				return -ENODEV;
+			}
+		}
+		request_region((base+2),1,
+			"i2c (PPORT adapter)");
+		bit_pport_setsda((void*)base,1);
+		bit_pport_setscl((void*)base,1);
+	}
+	return 0;
+}
+
+static void __exit bit_pport_exit(void)
+{
+	release_region((base+2),1);
+}
+
+static int bit_pport_reg(struct i2c_client *client)
+{
+	return 0;
+}
+
+static int bit_pport_unreg(struct i2c_client *client)
+{
+	release_region((base+2),1);
+	return 0;
+}
+
+static void bit_pport_inc_use(struct i2c_adapter *adap)
+{
+#ifdef MODULE
+	MOD_INC_USE_COUNT;
+#endif
+}
+
+static void bit_pport_dec_use(struct i2c_adapter *adap)
+{
+#ifdef MODULE
+	MOD_DEC_USE_COUNT;
+#endif
+}
+
+/* ------------------------------------------------------------------------
+ * Encapsulate the above functions in the correct operations structure.
+ * This is only done when more than one hardware adapter is supported.
+ */
+static struct i2c_algo_bit_data bit_pport_data = {
+	NULL,
+	bit_pport_setsda,
+	bit_pport_setscl,
+	bit_pport_getsda,
+	bit_pport_getscl,
+	//NULL,
+	40, 80, 100,		/*	waits, timeout */
+};
+
+static struct i2c_adapter bit_pport_ops = {
+	"Primitive Parallel port adaptor",
+	I2C_HW_B_PPORT,
+	NULL,
+	&bit_pport_data,
+	bit_pport_inc_use,
+	bit_pport_dec_use,
+	bit_pport_reg,
+	bit_pport_unreg,	
+};
+
+int __init i2c_bitpport_init(void)
+{
+	printk("i2c-pport.o: i2c Primitive parallel port adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
+
+	if (base==0) {
+		/* probe some values */
+		base=DEFAULT_BASE;
+		bit_pport_data.data=(void*)DEFAULT_BASE;
+		if (bit_pport_init()==0) {
+			if(i2c_bit_add_bus(&bit_pport_ops) < 0)
+				return -ENODEV;
+		} else {
+			return -ENODEV;
+		}
+	} else {
+		bit_pport_data.data=(void*)base;
+		if (bit_pport_init()==0) {
+			if(i2c_bit_add_bus(&bit_pport_ops) < 0)
+				return -ENODEV;
+		} else {
+			return -ENODEV;
+		}
+	}
+	printk("i2c-pport.o: found device at %#x.\n",base);
+	return 0;
+}
+
+
+#ifdef MODULE
+MODULE_AUTHOR("Daniel Smolik <marvin@sitour.cz>");
+MODULE_DESCRIPTION("I2C-Bus adapter routines for Primitive parallel port adapter")
+;
+
+MODULE_PARM(base, "i");
+
+int init_module(void)
+{
+	return i2c_bitpport_init();
+}
+
+void cleanup_module(void)
+{
+	i2c_bit_del_bus(&bit_pport_ops);
+	bit_pport_exit();
+}
+
+#endif

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c
  2002-09-15 22:36 [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c Albert Cranford
@ 2002-09-15 23:00 ` Jeff Garzik
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2002-09-15 23:00 UTC (permalink / raw)
  To: Albert Cranford; +Cc: Linus Torvalds, Kernel mailing list

Albert Cranford wrote:

> +#ifdef MODULE_LICENSE
> +MODULE_LICENSE("GPL");
> +#endif

kill the ifdef


> +static int bit_pport_init(void)
> +{
> +	//release_region( (base+2) ,1);
> +
> +	if (check_region((base+2),1) < 0 ) {

wrong.  race.  use request_region, and check its return value. 
check_region should never be used.


> +		return -ENODEV;	
> +	} else {
> +
> +		/* test for PPORT adap. 	*/
> +	
> +
> +		PortData=inb(base+2);
> +		PortData= (PortData SET_SDA) SET_SCL;
> +		outb(PortData,base+2);				
> +
> +		if (!(inb(base+2) | 0x06)) {	/* SDA and SCL will be high	*/
> +			DEBINIT(printk("i2c-pport.o: SDA and SCL was low.\n"));
> +			return -ENODEV;
> +		} else {
> +		
> +			/*SCL high and SDA low*/
> +			PortData = PortData SET_SCL CLR_SDA;
> +			outb(PortData,base+2);	
> +			udelay(400);

long udelay in process context, where you should sleep instead



> +static void bit_pport_inc_use(struct i2c_adapter *adap)
> +{
> +#ifdef MODULE
> +	MOD_INC_USE_COUNT;
> +#endif
> +}
> +
> +static void bit_pport_dec_use(struct i2c_adapter *adap)
> +{
> +#ifdef MODULE
> +	MOD_DEC_USE_COUNT;
> +#endif

kill the ifdef.  use ->owner instead if possible.



> +#ifdef MODULE
> +MODULE_AUTHOR("Daniel Smolik <marvin@sitour.cz>");
> +MODULE_DESCRIPTION("I2C-Bus adapter routines for Primitive parallel port adapter")
> +;
> +
> +MODULE_PARM(base, "i");
> +
> +int init_module(void)
> +{
> +	return i2c_bitpport_init();
> +}
> +
> +void cleanup_module(void)
> +{
> +	i2c_bit_del_bus(&bit_pport_ops);
> +	bit_pport_exit();
> +}
> +
> +#endif

kill the ifdef, use module_init, module_exit


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c
@ 2005-05-19  6:23 Albert Cranford
  2005-05-19  6:23 ` [patch 2/9]Four new i2c drivers and __init/__exit cleanup to Jeff Garzik
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Albert Cranford @ 2005-05-19  6:23 UTC (permalink / raw)
  To: lm-sensors

This specific change set was for i2c-pport.c and 2.5.34.
I propose the following changes to satisfy 2.5 kernel
requirements.  Of course the #include changes and 
MODULE_LICENSE will not be checked into CVS.

The request to abandon udelay for sleep was not addressed.

Anyone see a problem with 2.2 or 2.4 and these changes?
Regards,
Albert
--- i2c-pport.c 2002-09-12 02:55:47.000000000 -0400
+++ /usr/src/linux/drivers/i2c/i2c-pport.c      2002-09-16 09:30:00.000000000 -0400
@@ -36,12 +36,10 @@
 #include <linux/ioport.h>
 #include <asm/io.h>
 #include <linux/errno.h>
-#include "i2c.h"
-#include "i2c-algo-bit.h"
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
 
-#ifdef MODULE_LICENSE
 MODULE_LICENSE("GPL");
-#endif
 
 #define DEFAULT_BASE 0x378
 static int base=0;
@@ -112,9 +110,7 @@
 
 static int bit_pport_init(void)
 {
-       //release_region( (base+2) ,1);
-
-       if (check_region((base+2),1) < 0 ) {
+       if (request_region((base+2),1, "i2c (PPORT adapter)") < 0 ) {
                return -ENODEV; 
        } else {
 
@@ -148,11 +144,6 @@
        return 0;
 }
 
-static void __exit bit_pport_exit(void)
-{
-       release_region((base+2),1);
-}
-
 static int bit_pport_reg(struct i2c_client *client)
 {
        return 0;
@@ -231,24 +222,16 @@
 }
 
 
-EXPORT_NO_SYMBOLS;
+static void __exit i2c_bitpport_exit(void)
+{
+       i2c_bit_del_bus(&bit_pport_ops);
+       release_region((base+2),1);
+}
 
-#ifdef MODULE
 MODULE_AUTHOR("Daniel Smolik <marvin@sitour.cz>");
 MODULE_DESCRIPTION("I2C-Bus adapter routines for Primitive parallel port adapter")
 ;
-
 MODULE_PARM(base, "i");
 
-int init_module(void)
-{
-       return i2c_bitpport_init();
-}
-
-void cleanup_module(void)
-{
-       i2c_bit_del_bus(&bit_pport_ops);
-       bit_pport_exit();
-}
-
-#endif
+module_init(i2c_bitpport_init);
+module_exit(i2c_bitpport_exit);

Jeff Garzik wrote:
> 
> Albert Cranford wrote:
> 
> > +#ifdef MODULE_LICENSE
> > +MODULE_LICENSE("GPL");
> > +#endif
> 
> kill the ifdef
> 
> > +static int bit_pport_init(void)
> > +{
> > +     //release_region( (base+2) ,1);
> > +
> > +     if (check_region((base+2),1) < 0 ) {
> 
> wrong.  race.  use request_region, and check its return value.
> check_region should never be used.
> 
> > +             return -ENODEV;
> > +     } else {
> > +
> > +             /* test for PPORT adap.         */
> > +
> > +
> > +             PortData=inb(base+2);
> > +             PortData= (PortData SET_SDA) SET_SCL;
> > +             outb(PortData,base+2);
> > +
> > +             if (!(inb(base+2) | 0x06)) {    /* SDA and SCL will be high     */
> > +                     DEBINIT(printk("i2c-pport.o: SDA and SCL was low.\n"));
> > +                     return -ENODEV;
> > +             } else {
> > +
> > +                     /*SCL high and SDA low*/
> > +                     PortData = PortData SET_SCL CLR_SDA;
> > +                     outb(PortData,base+2);
> > +                     udelay(400);
> 
> long udelay in process context, where you should sleep instead
> 
> > +static void bit_pport_inc_use(struct i2c_adapter *adap)
> > +{
> > +#ifdef MODULE
> > +     MOD_INC_USE_COUNT;
> > +#endif
> > +}
> > +
> > +static void bit_pport_dec_use(struct i2c_adapter *adap)
> > +{
> > +#ifdef MODULE
> > +     MOD_DEC_USE_COUNT;
> > +#endif
> 
> kill the ifdef.  use ->owner instead if possible.
> 
> > +#ifdef MODULE
> > +MODULE_AUTHOR("Daniel Smolik <marvin@sitour.cz>");
> > +MODULE_DESCRIPTION("I2C-Bus adapter routines for Primitive parallel port adapter")
> > +;
> > +
> > +MODULE_PARM(base, "i");
> > +
> > +int init_module(void)
> > +{
> > +     return i2c_bitpport_init();
> > +}
> > +
> > +void cleanup_module(void)
> > +{
> > +     i2c_bit_del_bus(&bit_pport_ops);
> > +     bit_pport_exit();
> > +}
> > +
> > +#endif
> 
> kill the ifdef, use module_init, module_exit

-- 
Albert Cranford Deerfield Beach FL USA
ac9410@bellsouth.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch 2/9]Four new i2c drivers and __init/__exit cleanup to
  2005-05-19  6:23 [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c Albert Cranford
@ 2005-05-19  6:23 ` Jeff Garzik
  2005-05-19  6:23 ` [patch 2/9]Four new i2c drivers and __init/__exit cleanup toi2c Jeff Garzik
  2005-05-19  6:23 ` Albert Cranford
  2 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2005-05-19  6:23 UTC (permalink / raw)
  To: lm-sensors

Albert Cranford wrote:
> -#ifdef MODULE_LICENSE
>  MODULE_LICENSE("GPL");
> -#endif

This change requires that you define MODULE_LICENSE in a kernel 
compatibility header, for 2.2.

It will work without such assistance in 2.4 and 2.5.


>  #define DEFAULT_BASE 0x378
>  static int base=0;
> @@ -112,9 +110,7 @@
>  
>  static int bit_pport_init(void)
>  {
> -       //release_region( (base+2) ,1);
> -
> -       if (check_region((base+2),1) < 0 ) {
> +       if (request_region((base+2),1, "i2c (PPORT adapter)") < 0 ) {
>                 return -ENODEV; 
>         } else {
>  

request_region returns non-zero on success...


> @@ -148,11 +144,6 @@
>         return 0;
>  }
>  
> -static void __exit bit_pport_exit(void)
> -{
> -       release_region((base+2),1);
> -}
> -
>  static int bit_pport_reg(struct i2c_client *client)
>  {
>         return 0;
> @@ -231,24 +222,16 @@
>  }
>  
>  
> -EXPORT_NO_SYMBOLS;

Why remove export-no-symbols?


> +static void __exit i2c_bitpport_exit(void)
> +{
> +       i2c_bit_del_bus(&bit_pport_ops);
> +       release_region((base+2),1);
> +}
>  
> -#ifdef MODULE
>  MODULE_AUTHOR("Daniel Smolik <marvin@sitour.cz>");
>  MODULE_DESCRIPTION("I2C-Bus adapter routines for Primitive parallel port adapter")
>  ;
> -
>  MODULE_PARM(base, "i");
>  
> -int init_module(void)
> -{
> -       return i2c_bitpport_init();
> -}
> -
> -void cleanup_module(void)
> -{
> -       i2c_bit_del_bus(&bit_pport_ops);
> -       bit_pport_exit();
> -}
> -
> -#endif
> +module_init(i2c_bitpport_init);
> +module_exit(i2c_bitpport_exit);


This looks ok to me.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch 2/9]Four new i2c drivers and __init/__exit cleanup toi2c
  2005-05-19  6:23 [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c Albert Cranford
  2005-05-19  6:23 ` [patch 2/9]Four new i2c drivers and __init/__exit cleanup to Jeff Garzik
  2005-05-19  6:23 ` [patch 2/9]Four new i2c drivers and __init/__exit cleanup toi2c Jeff Garzik
@ 2005-05-19  6:23 ` Albert Cranford
  2 siblings, 0 replies; 6+ messages in thread
From: Albert Cranford @ 2005-05-19  6:23 UTC (permalink / raw)
  To: lm-sensors

Hi Jeff,
I think I noted that compatibility stuff will not be
checked in, but noted here for linux-2.5.xx.  This is
something that I have to manually ignore when diffing 
CVS and kernel.  And yes EXPORT_NO_SYMBOLS is explicitly
defined now in 2.5.xx, but no harm in redundency, so I'll
leave it in the code.

I repaired the call to request_region and also removed an
unneeded call to request_region from the else path.

Now I need someone to test it in the different versions.

New change set.
Albert
--- i2c-pport.c 2002-09-12 02:55:47.000000000 -0400
+++ /usr/src/linux/drivers/i2c/i2c-pport.c      2002-09-17 08:39:20.000000000 -0400
@@ -36,12 +36,10 @@
 #include <linux/ioport.h>
 #include <asm/io.h>
 #include <linux/errno.h>
-#include "i2c.h"
-#include "i2c-algo-bit.h"
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
 
-#ifdef MODULE_LICENSE
 MODULE_LICENSE("GPL");
-#endif
 
 #define DEFAULT_BASE 0x378
 static int base=0;
@@ -112,9 +110,7 @@
 
 static int bit_pport_init(void)
 {
-       //release_region( (base+2) ,1);
-
-       if (check_region((base+2),1) < 0 ) {
+       if (!request_region((base+2),1, "i2c (PPORT adapter)")) {
                return -ENODEV; 
        } else {
 
@@ -140,19 +136,12 @@
                                return -ENODEV;
                        }
                }
-               request_region((base+2),1,
-                       "i2c (PPORT adapter)");
                bit_pport_setsda((void*)base,1);
                bit_pport_setscl((void*)base,1);
        }
        return 0;
 }
 
-static void __exit bit_pport_exit(void)
-{
-       release_region((base+2),1);
-}
-
 static int bit_pport_reg(struct i2c_client *client)
 {
        return 0;
@@ -231,24 +220,17 @@
 }
 
 
-EXPORT_NO_SYMBOLS;
+static void __exit i2c_bitpport_exit(void)
+{
+       i2c_bit_del_bus(&bit_pport_ops);
+       release_region((base+2),1);
+}
 
-#ifdef MODULE
+EXPORT_NO_SYMBOLS;
 MODULE_AUTHOR("Daniel Smolik <marvin@sitour.cz>");
 MODULE_DESCRIPTION("I2C-Bus adapter routines for Primitive parallel port adapter")
 ;
-
 MODULE_PARM(base, "i");
 
-int init_module(void)
-{
-       return i2c_bitpport_init();
-}
-
-void cleanup_module(void)
-{
-       i2c_bit_del_bus(&bit_pport_ops);
-       bit_pport_exit();
-}
-
-#endif
+module_init(i2c_bitpport_init);
+module_exit(i2c_bitpport_exit);


Jeff Garzik wrote:
> 
> Albert Cranford wrote:
> > -#ifdef MODULE_LICENSE
> >  MODULE_LICENSE("GPL");
> > -#endif
> 
> This change requires that you define MODULE_LICENSE in a kernel
> compatibility header, for 2.2.
> 
> It will work without such assistance in 2.4 and 2.5.
> 
> >  #define DEFAULT_BASE 0x378
> >  static int base=0;
> > @@ -112,9 +110,7 @@
> >
> >  static int bit_pport_init(void)
> >  {
> > -       //release_region( (base+2) ,1);
> > -
> > -       if (check_region((base+2),1) < 0 ) {
> > +       if (request_region((base+2),1, "i2c (PPORT adapter)") < 0 ) {
> >                 return -ENODEV;
> >         } else {
> >
> 
> request_region returns non-zero on success...
> 
> > @@ -148,11 +144,6 @@
> >         return 0;
> >  }
> >
> > -static void __exit bit_pport_exit(void)
> > -{
> > -       release_region((base+2),1);
> > -}
> > -
> >  static int bit_pport_reg(struct i2c_client *client)
> >  {
> >         return 0;
> > @@ -231,24 +222,16 @@
> >  }
> >
> >
> > -EXPORT_NO_SYMBOLS;
> 
> Why remove export-no-symbols?
> 
> > +static void __exit i2c_bitpport_exit(void)
> > +{
> > +       i2c_bit_del_bus(&bit_pport_ops);
> > +       release_region((base+2),1);
> > +}
> >
> > -#ifdef MODULE
> >  MODULE_AUTHOR("Daniel Smolik <marvin@sitour.cz>");
> >  MODULE_DESCRIPTION("I2C-Bus adapter routines for Primitive parallel port adapter")
> >  ;
> > -
> >  MODULE_PARM(base, "i");
> >
> > -int init_module(void)
> > -{
> > -       return i2c_bitpport_init();
> > -}
> > -
> > -void cleanup_module(void)
> > -{
> > -       i2c_bit_del_bus(&bit_pport_ops);
> > -       bit_pport_exit();
> > -}
> > -
> > -#endif
> > +module_init(i2c_bitpport_init);
> > +module_exit(i2c_bitpport_exit);
> 
> This looks ok to me.

-- 
Albert Cranford Deerfield Beach FL USA
ac9410@bellsouth.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch 2/9]Four new i2c drivers and __init/__exit cleanup toi2c
  2005-05-19  6:23 [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c Albert Cranford
  2005-05-19  6:23 ` [patch 2/9]Four new i2c drivers and __init/__exit cleanup to Jeff Garzik
@ 2005-05-19  6:23 ` Jeff Garzik
  2005-05-19  6:23 ` Albert Cranford
  2 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2005-05-19  6:23 UTC (permalink / raw)
  To: lm-sensors

Albert Cranford wrote:
> Hi Jeff,
> I think I noted that compatibility stuff will not be
> checked in, but noted here for linux-2.5.xx.  This is
> something that I have to manually ignore when diffing 
> CVS and kernel.  And yes EXPORT_NO_SYMBOLS is explicitly
> defined now in 2.5.xx, but no harm in redundency, so I'll
> leave it in the code.
> 
> I repaired the call to request_region and also removed an
> unneeded call to request_region from the else path.
> 
> Now I need someone to test it in the different versions.
> 
> New change set.
> Albert
> --- i2c-pport.c 2002-09-12 02:55:47.000000000 -0400
> +++ /usr/src/linux/drivers/i2c/i2c-pport.c      2002-09-17 08:39:20.000000000 -0400


Yes, this patch looks fine to me...

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-05-19  6:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:23 [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c Albert Cranford
2005-05-19  6:23 ` [patch 2/9]Four new i2c drivers and __init/__exit cleanup to Jeff Garzik
2005-05-19  6:23 ` [patch 2/9]Four new i2c drivers and __init/__exit cleanup toi2c Jeff Garzik
2005-05-19  6:23 ` Albert Cranford
  -- strict thread matches above, loose matches on Subject: below --
2002-09-15 22:36 [patch 2/9]Four new i2c drivers and __init/__exit cleanup to i2c Albert Cranford
2002-09-15 23:00 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.