nfs: new subdir Documentation/filesystems/nfs
[safe/jmp/linux-2.6] / drivers / mfd / ab3100-core.c
index bba534b..6134810 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/platform_device.h>
 #include <linux/device.h>
 #include <linux/interrupt.h>
-#include <linux/workqueue.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/uaccess.h>
@@ -58,8 +57,6 @@
  * The AB3100 is usually assigned address 0x48 (7-bit)
  * The chip is defined in the platform i2c_board_data section.
  */
-static unsigned short normal_i2c[] = { 0x48, I2C_CLIENT_END };
-I2C_CLIENT_INSMOD_1(ab3100);
 
 u8 ab3100_get_chip_type(struct ab3100 *ab3100)
 {
@@ -422,7 +419,7 @@ static irqreturn_t ab3100_irq_handler(int irq, void *data)
         * stuff and we will re-enable the interrupts once th
         * worker has finished.
         */
-       disable_irq(ab3100->i2c_client->irq);
+       disable_irq_nosync(irq);
        schedule_work(&ab3100->work);
        return IRQ_HANDLED;
 }
@@ -648,7 +645,7 @@ struct ab3100_init_setting {
        u8 setting;
 };
 
-static const struct ab3100_init_setting __initdata
+static const struct ab3100_init_setting __initconst
 ab3100_init_settings[] = {
        {
                .abreg = AB3100_MCA,
@@ -838,6 +835,8 @@ static int __init ab3100_probe(struct i2c_client *client,
                        const struct i2c_device_id *id)
 {
        struct ab3100 *ab3100;
+       struct ab3100_platform_data *ab3100_plf_data =
+               client->dev.platform_data;
        int err;
        int i;
 
@@ -921,6 +920,8 @@ static int __init ab3100_probe(struct i2c_client *client,
        for (i = 0; i < ARRAY_SIZE(ab3100_platform_devs); i++) {
                ab3100_platform_devs[i]->dev.parent =
                        &client->dev;
+               ab3100_platform_devs[i]->dev.platform_data =
+                       ab3100_plf_data;
                platform_set_drvdata(ab3100_platform_devs[i], ab3100);
        }
 
@@ -963,7 +964,7 @@ static int __exit ab3100_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ab3100_id[] = {
-       { "ab3100", ab3100 },
+       { "ab3100", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ab3100_id);