Commit 442bf564 authored by Hans de Goede's avatar Hans de Goede

platform/x86: x86-android-tablets: Constify the gpiod_lookup_tables arrays

The individual gpiod_lookup_table structs cannot be const because they
contain a list-head which gets used when registering them.

But the array of pointers to the gpiod_lookup_table-s used by a board
can be const, constify these.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-By: default avatarLubomir Rintel <lkundrak@V3.sk>
Link: https://lore.kernel.org/r/20220110103952.48760-3-hdegoede@redhat.com
parent 84c2dcdd
...@@ -146,7 +146,7 @@ struct x86_serdev_info { ...@@ -146,7 +146,7 @@ struct x86_serdev_info {
struct x86_dev_info { struct x86_dev_info {
char *invalid_aei_gpiochip; char *invalid_aei_gpiochip;
const char * const *modules; const char * const *modules;
struct gpiod_lookup_table **gpiod_lookup_tables; struct gpiod_lookup_table * const *gpiod_lookup_tables;
const struct x86_i2c_client_info *i2c_client_info; const struct x86_i2c_client_info *i2c_client_info;
const struct platform_device_info *pdev_info; const struct platform_device_info *pdev_info;
const struct x86_serdev_info *serdev_info; const struct x86_serdev_info *serdev_info;
...@@ -306,7 +306,7 @@ static struct gpiod_lookup_table asus_me176c_goodix_gpios = { ...@@ -306,7 +306,7 @@ static struct gpiod_lookup_table asus_me176c_goodix_gpios = {
}, },
}; };
static struct gpiod_lookup_table *asus_me176c_gpios[] = { static struct gpiod_lookup_table * const asus_me176c_gpios[] = {
&int3496_gpo2_pin22_gpios, &int3496_gpo2_pin22_gpios,
&asus_me176c_goodix_gpios, &asus_me176c_goodix_gpios,
NULL NULL
...@@ -410,7 +410,7 @@ static const struct x86_i2c_client_info asus_tf103c_i2c_clients[] __initconst = ...@@ -410,7 +410,7 @@ static const struct x86_i2c_client_info asus_tf103c_i2c_clients[] __initconst =
}, },
}; };
static struct gpiod_lookup_table *asus_tf103c_gpios[] = { static struct gpiod_lookup_table * const asus_tf103c_gpios[] = {
&int3496_gpo2_pin22_gpios, &int3496_gpo2_pin22_gpios,
NULL NULL
}; };
...@@ -565,7 +565,7 @@ static struct gpiod_lookup_table whitelabel_tm800a550l_goodix_gpios = { ...@@ -565,7 +565,7 @@ static struct gpiod_lookup_table whitelabel_tm800a550l_goodix_gpios = {
}, },
}; };
static struct gpiod_lookup_table *whitelabel_tm800a550l_gpios[] = { static struct gpiod_lookup_table * const whitelabel_tm800a550l_gpios[] = {
&whitelabel_tm800a550l_goodix_gpios, &whitelabel_tm800a550l_goodix_gpios,
NULL NULL
}; };
...@@ -675,7 +675,7 @@ static int serdev_count; ...@@ -675,7 +675,7 @@ static int serdev_count;
static struct i2c_client **i2c_clients; static struct i2c_client **i2c_clients;
static struct platform_device **pdevs; static struct platform_device **pdevs;
static struct serdev_device **serdevs; static struct serdev_device **serdevs;
static struct gpiod_lookup_table **gpiod_lookup_tables; static struct gpiod_lookup_table * const *gpiod_lookup_tables;
static void (*exit_handler)(void); static void (*exit_handler)(void);
static __init int x86_instantiate_i2c_client(const struct x86_dev_info *dev_info, static __init int x86_instantiate_i2c_client(const struct x86_dev_info *dev_info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment