-diff -uprN linux-2.6.23.orig/drivers/i2c/chips/eeprom.c linux-2.6.23/drivers/i2c/chips/eeprom.c
---- linux-2.6.23.orig/drivers/i2c/chips/eeprom.c 2007-10-09 15:31:38.000000000 -0500
-+++ linux-2.6.23/drivers/i2c/chips/eeprom.c 2007-10-11 00:57:25.000000000 -0500
+--- a/drivers/i2c/chips/eeprom.c
++++ b/drivers/i2c/chips/eeprom.c
@@ -33,6 +33,8 @@
#include <linux/jiffies.h>
#include <linux/i2c.h>
+#include <linux/eeprom.h>
/* Addresses to scan */
- static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54,
-@@ -41,26 +43,7 @@ static unsigned short normal_i2c[] = { 0
+ static const unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54,
+@@ -41,26 +43,7 @@
/* Insmod parameters */
I2C_CLIENT_INSMOD_1(eeprom);
static int eeprom_attach_adapter(struct i2c_adapter *adapter);
static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind);
-@@ -191,6 +174,7 @@ static int eeprom_detect(struct i2c_adap
+@@ -197,6 +180,7 @@
data->valid = 0;
mutex_init(&data->update_lock);
data->nature = UNKNOWN;
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
-@@ -214,6 +198,9 @@ static int eeprom_detect(struct i2c_adap
+@@ -224,6 +208,9 @@
if (err)
goto exit_detach;
return 0;
exit_detach:
-@@ -239,6 +226,41 @@ static int eeprom_detach_client(struct i
+@@ -249,6 +236,41 @@
return 0;
}
static int __init eeprom_init(void)
{
return i2c_add_driver(&eeprom_driver);
-diff -uprN linux-2.6.23.orig/include/linux/eeprom.h linux-2.6.23/include/linux/eeprom.h
---- linux-2.6.23.orig/include/linux/eeprom.h 1969-12-31 18:00:00.000000000 -0600
-+++ linux-2.6.23/include/linux/eeprom.h 2007-10-11 00:57:25.000000000 -0500
+--- /dev/null
++++ b/include/linux/eeprom.h
@@ -0,0 +1,71 @@
+#ifndef _LINUX_EEPROM_H
+#define _LINUX_EEPROM_H
+extern int unregister_eeprom_notifier(struct notifier_block *nb);
+
+#endif /* _LINUX_EEPROM_H */
-diff -uprN linux-2.6.23.orig/include/linux/notifier.h linux-2.6.23/include/linux/notifier.h
---- linux-2.6.23.orig/include/linux/notifier.h 2007-10-09 15:31:38.000000000 -0500
-+++ linux-2.6.23/include/linux/notifier.h 2007-10-11 00:57:25.000000000 -0500
-@@ -231,5 +231,8 @@ static inline int notifier_to_errno(int
- #define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */
- #define PM_POST_SUSPEND 0x0004 /* Suspend finished */
+--- a/include/linux/notifier.h
++++ b/include/linux/notifier.h
+@@ -248,5 +248,8 @@
+ #define VT_WRITE 0x0003 /* A char got output */
+ #define VT_UPDATE 0x0004 /* A bigger update occurred */
+/* eeprom notifier chain */
+#define EEPROM_REGISTER 0x0001