Merge tag 'for-linus-20121219' of git://git.infradead.org/linux-mtd
[firefly-linux-kernel-4.4.55.git] / drivers / input / keyboard / adp5588-keys.c
index 39ebffac207edc419dcc381aff9aae3791a6e53d..dbd2047f1641f0751340eade88c408f31201f318 100644 (file)
@@ -145,7 +145,7 @@ static int adp5588_gpio_direction_output(struct gpio_chip *chip,
        return ret;
 }
 
-static int __devinit adp5588_build_gpiomap(struct adp5588_kpad *kpad,
+static int adp5588_build_gpiomap(struct adp5588_kpad *kpad,
                                const struct adp5588_kpad_platform_data *pdata)
 {
        bool pin_used[ADP5588_MAXGPIO];
@@ -170,7 +170,7 @@ static int __devinit adp5588_build_gpiomap(struct adp5588_kpad *kpad,
        return n_unused;
 }
 
-static int __devinit adp5588_gpio_add(struct adp5588_kpad *kpad)
+static int adp5588_gpio_add(struct adp5588_kpad *kpad)
 {
        struct device *dev = &kpad->client->dev;
        const struct adp5588_kpad_platform_data *pdata = dev->platform_data;
@@ -197,6 +197,7 @@ static int __devinit adp5588_gpio_add(struct adp5588_kpad *kpad)
        kpad->gc.base = gpio_data->gpio_start;
        kpad->gc.label = kpad->client->name;
        kpad->gc.owner = THIS_MODULE;
+       kpad->gc.names = gpio_data->names;
 
        mutex_init(&kpad->gpio_lock);
 
@@ -223,7 +224,7 @@ static int __devinit adp5588_gpio_add(struct adp5588_kpad *kpad)
        return 0;
 }
 
-static void __devexit adp5588_gpio_remove(struct adp5588_kpad *kpad)
+static void adp5588_gpio_remove(struct adp5588_kpad *kpad)
 {
        struct device *dev = &kpad->client->dev;
        const struct adp5588_kpad_platform_data *pdata = dev->platform_data;
@@ -318,7 +319,7 @@ static irqreturn_t adp5588_irq(int irq, void *handle)
        return IRQ_HANDLED;
 }
 
-static int __devinit adp5588_setup(struct i2c_client *client)
+static int adp5588_setup(struct i2c_client *client)
 {
        const struct adp5588_kpad_platform_data *pdata = client->dev.platform_data;
        const struct adp5588_gpio_platform_data *gpio_data = pdata->gpio_data;
@@ -381,7 +382,7 @@ static int __devinit adp5588_setup(struct i2c_client *client)
        return 0;
 }
 
-static void __devinit adp5588_report_switch_state(struct adp5588_kpad *kpad)
+static void adp5588_report_switch_state(struct adp5588_kpad *kpad)
 {
        int gpi_stat1 = adp5588_read(kpad->client, GPIO_DAT_STAT1);
        int gpi_stat2 = adp5588_read(kpad->client, GPIO_DAT_STAT2);
@@ -419,8 +420,8 @@ static void __devinit adp5588_report_switch_state(struct adp5588_kpad *kpad)
 }
 
 
-static int __devinit adp5588_probe(struct i2c_client *client,
-                                       const struct i2c_device_id *id)
+static int adp5588_probe(struct i2c_client *client,
+                        const struct i2c_device_id *id)
 {
        struct adp5588_kpad *kpad;
        const struct adp5588_kpad_platform_data *pdata = client->dev.platform_data;
@@ -586,7 +587,7 @@ static int __devinit adp5588_probe(struct i2c_client *client,
        return error;
 }
 
-static int __devexit adp5588_remove(struct i2c_client *client)
+static int adp5588_remove(struct i2c_client *client)
 {
        struct adp5588_kpad *kpad = i2c_get_clientdata(client);
 
@@ -649,7 +650,7 @@ static struct i2c_driver adp5588_driver = {
 #endif
        },
        .probe    = adp5588_probe,
-       .remove   = __devexit_p(adp5588_remove),
+       .remove   = adp5588_remove,
        .id_table = adp5588_id,
 };