hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/arm/mach-sa1100/generic.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-sa1100/generic.c
34 *
45 * Author: Nicolas Pitre
56 *
67 * Code common to all SA11x0 machines.
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129 #include <linux/gpio.h>
1310 #include <linux/gpio/machine.h>
....@@ -235,18 +232,11 @@
235232 sa11x0_register_device(&sa11x0fb_device, inf);
236233 }
237234
238
-static bool sa11x0pcmcia_legacy = true;
239
-static struct platform_device sa11x0pcmcia_device = {
240
- .name = "sa11x0-pcmcia",
241
- .id = -1,
242
-};
243
-
244235 void sa11x0_register_pcmcia(int socket, struct gpiod_lookup_table *table)
245236 {
246237 if (table)
247238 gpiod_add_lookup_table(table);
248239 platform_device_register_simple("sa11x0-pcmcia", socket, NULL, 0);
249
- sa11x0pcmcia_legacy = false;
250240 }
251241
252242 static struct platform_device sa11x0mtd_device = {
....@@ -331,9 +321,6 @@
331321 {
332322 pm_power_off = sa1100_power_off;
333323
334
- if (sa11x0pcmcia_legacy)
335
- platform_device_register(&sa11x0pcmcia_device);
336
-
337324 regulator_has_full_constraints();
338325
339326 return platform_add_devices(sa11x0_devices, ARRAY_SIZE(sa11x0_devices));
....@@ -348,7 +335,8 @@
348335
349336 int __init sa11x0_register_fixed_regulator(int n,
350337 struct fixed_voltage_config *cfg,
351
- struct regulator_consumer_supply *supplies, unsigned num_supplies)
338
+ struct regulator_consumer_supply *supplies, unsigned num_supplies,
339
+ bool uses_gpio)
352340 {
353341 struct regulator_init_data *id;
354342
....@@ -356,7 +344,7 @@
356344 if (!cfg->init_data)
357345 return -ENOMEM;
358346
359
- if (cfg->gpio < 0)
347
+ if (!uses_gpio)
360348 id->constraints.always_on = 1;
361349 id->constraints.name = cfg->supply_name;
362350 id->constraints.min_uV = cfg->microvolts;