diff options
author | Helge Deller <deller@gmx.de> | 2018-03-04 16:26:11 -0500 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2018-03-27 12:52:21 -0400 |
commit | b86db40e1ecc910c73b6bed8368816d9ae378fb6 (patch) | |
tree | 65b79b17b505f2aeda25217ce3c8135ac2c6f85f | |
parent | d5b59a71204b0a9a55eda633347b1214642bead3 (diff) |
parisc: Move various functions and strings to init section
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | arch/parisc/kernel/drivers.c | 22 | ||||
-rw-r--r-- | arch/parisc/kernel/hardware.c | 12 |
2 files changed, 17 insertions, 17 deletions
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 29b99b8964aa..d4256145b74c 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c | |||
@@ -135,7 +135,7 @@ static int parisc_driver_probe(struct device *dev) | |||
135 | return rc; | 135 | return rc; |
136 | } | 136 | } |
137 | 137 | ||
138 | static int parisc_driver_remove(struct device *dev) | 138 | static int __exit parisc_driver_remove(struct device *dev) |
139 | { | 139 | { |
140 | struct parisc_device *pa_dev = to_parisc_device(dev); | 140 | struct parisc_device *pa_dev = to_parisc_device(dev); |
141 | struct parisc_driver *pa_drv = to_parisc_driver(dev->driver); | 141 | struct parisc_driver *pa_drv = to_parisc_driver(dev->driver); |
@@ -205,7 +205,7 @@ static int match_and_count(struct device * dev, void * data) | |||
205 | * Use by IOMMU support to "guess" the right size IOPdir. | 205 | * Use by IOMMU support to "guess" the right size IOPdir. |
206 | * Formula is something like memsize/(num_iommu * entry_size). | 206 | * Formula is something like memsize/(num_iommu * entry_size). |
207 | */ | 207 | */ |
208 | int count_parisc_driver(struct parisc_driver *driver) | 208 | int __init count_parisc_driver(struct parisc_driver *driver) |
209 | { | 209 | { |
210 | struct match_count m = { | 210 | struct match_count m = { |
211 | .driver = driver, | 211 | .driver = driver, |
@@ -268,7 +268,7 @@ static struct parisc_device *find_device_by_addr(unsigned long hpa) | |||
268 | * Walks up the device tree looking for a device of the specified type. | 268 | * Walks up the device tree looking for a device of the specified type. |
269 | * If it finds it, it returns it. If not, it returns NULL. | 269 | * If it finds it, it returns it. If not, it returns NULL. |
270 | */ | 270 | */ |
271 | const struct parisc_device * | 271 | const struct parisc_device * __init |
272 | find_pa_parent_type(const struct parisc_device *padev, int type) | 272 | find_pa_parent_type(const struct parisc_device *padev, int type) |
273 | { | 273 | { |
274 | const struct device *dev = &padev->dev; | 274 | const struct device *dev = &padev->dev; |
@@ -397,7 +397,7 @@ static void setup_bus_id(struct parisc_device *padev) | |||
397 | dev_set_name(&padev->dev, name); | 397 | dev_set_name(&padev->dev, name); |
398 | } | 398 | } |
399 | 399 | ||
400 | struct parisc_device * create_tree_node(char id, struct device *parent) | 400 | struct parisc_device * __init create_tree_node(char id, struct device *parent) |
401 | { | 401 | { |
402 | struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL); | 402 | struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
403 | if (!dev) | 403 | if (!dev) |
@@ -471,7 +471,7 @@ static struct parisc_device *create_parisc_device(struct hardware_path *modpath) | |||
471 | return alloc_tree_node(parent, modpath->mod); | 471 | return alloc_tree_node(parent, modpath->mod); |
472 | } | 472 | } |
473 | 473 | ||
474 | struct parisc_device * | 474 | struct parisc_device * __init |
475 | alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) | 475 | alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) |
476 | { | 476 | { |
477 | int status; | 477 | int status; |
@@ -609,7 +609,7 @@ struct bus_type parisc_bus_type = { | |||
609 | .uevent = parisc_uevent, | 609 | .uevent = parisc_uevent, |
610 | .dev_groups = parisc_device_groups, | 610 | .dev_groups = parisc_device_groups, |
611 | .probe = parisc_driver_probe, | 611 | .probe = parisc_driver_probe, |
612 | .remove = parisc_driver_remove, | 612 | .remove = __exit_p(parisc_driver_remove), |
613 | }; | 613 | }; |
614 | 614 | ||
615 | /** | 615 | /** |
@@ -619,7 +619,7 @@ struct bus_type parisc_bus_type = { | |||
619 | * Search the driver list for a driver that is willing to manage | 619 | * Search the driver list for a driver that is willing to manage |
620 | * this device. | 620 | * this device. |
621 | */ | 621 | */ |
622 | int register_parisc_device(struct parisc_device *dev) | 622 | int __init register_parisc_device(struct parisc_device *dev) |
623 | { | 623 | { |
624 | if (!dev) | 624 | if (!dev) |
625 | return 0; | 625 | return 0; |
@@ -791,7 +791,7 @@ EXPORT_SYMBOL(device_to_hwpath); | |||
791 | static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high, | 791 | static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high, |
792 | struct device *parent); | 792 | struct device *parent); |
793 | 793 | ||
794 | void walk_lower_bus(struct parisc_device *dev) | 794 | static void walk_lower_bus(struct parisc_device *dev) |
795 | { | 795 | { |
796 | unsigned long io_io_low, io_io_high; | 796 | unsigned long io_io_low, io_io_high; |
797 | 797 | ||
@@ -857,7 +857,7 @@ static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high, | |||
857 | * PDC doesn't tell us about all devices in the system. This routine | 857 | * PDC doesn't tell us about all devices in the system. This routine |
858 | * finds devices connected to the central bus. | 858 | * finds devices connected to the central bus. |
859 | */ | 859 | */ |
860 | void walk_central_bus(void) | 860 | void __init walk_central_bus(void) |
861 | { | 861 | { |
862 | walk_native_bus(CENTRAL_BUS_ADDR, | 862 | walk_native_bus(CENTRAL_BUS_ADDR, |
863 | CENTRAL_BUS_ADDR + (MAX_NATIVE_DEVICES * NATIVE_DEVICE_OFFSET), | 863 | CENTRAL_BUS_ADDR + (MAX_NATIVE_DEVICES * NATIVE_DEVICE_OFFSET), |
@@ -886,7 +886,7 @@ static void print_parisc_device(struct parisc_device *dev) | |||
886 | /** | 886 | /** |
887 | * init_parisc_bus - Some preparation to be done before inventory | 887 | * init_parisc_bus - Some preparation to be done before inventory |
888 | */ | 888 | */ |
889 | void init_parisc_bus(void) | 889 | void __init init_parisc_bus(void) |
890 | { | 890 | { |
891 | if (bus_register(&parisc_bus_type)) | 891 | if (bus_register(&parisc_bus_type)) |
892 | panic("Could not register PA-RISC bus type\n"); | 892 | panic("Could not register PA-RISC bus type\n"); |
@@ -908,7 +908,7 @@ static int print_one_device(struct device * dev, void * data) | |||
908 | /** | 908 | /** |
909 | * print_parisc_devices - Print out a list of devices found in this system | 909 | * print_parisc_devices - Print out a list of devices found in this system |
910 | */ | 910 | */ |
911 | void print_parisc_devices(void) | 911 | void __init print_parisc_devices(void) |
912 | { | 912 | { |
913 | for_each_padev(print_one_device, NULL); | 913 | for_each_padev(print_one_device, NULL); |
914 | } | 914 | } |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index af3bc359dc70..a2058953a53f 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
@@ -41,7 +41,7 @@ | |||
41 | * are guessed. If you know the correct name, please let us know. | 41 | * are guessed. If you know the correct name, please let us know. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | static struct hp_hardware hp_hardware_list[] = { | 44 | static struct hp_hardware hp_hardware_list[] __initdata = { |
45 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, | 45 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, |
46 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, | 46 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, |
47 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, | 47 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, |
@@ -1238,7 +1238,7 @@ static struct hp_cpu_type_mask { | |||
1238 | unsigned short model; | 1238 | unsigned short model; |
1239 | unsigned short mask; | 1239 | unsigned short mask; |
1240 | enum cpu_type cpu; | 1240 | enum cpu_type cpu; |
1241 | } hp_cpu_type_mask_list[] = { | 1241 | } hp_cpu_type_mask_list[] __initdata = { |
1242 | 1242 | ||
1243 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ | 1243 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ |
1244 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ | 1244 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ |
@@ -1325,17 +1325,17 @@ const char * const cpu_name_version[][2] = { | |||
1325 | [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, | 1325 | [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, |
1326 | [pcxt_] = { "PA7200 (PCX-T')", "1.1c" }, | 1326 | [pcxt_] = { "PA7200 (PCX-T')", "1.1c" }, |
1327 | [pcxl] = { "PA7100LC (PCX-L)", "1.1d" }, | 1327 | [pcxl] = { "PA7100LC (PCX-L)", "1.1d" }, |
1328 | [pcxl2] = { "PA7300LC (PCX-L2)", "1.1e" }, | 1328 | [pcxl2] = { "PA7300LC (PCX-L2)","1.1e" }, |
1329 | [pcxu] = { "PA8000 (PCX-U)", "2.0" }, | 1329 | [pcxu] = { "PA8000 (PCX-U)", "2.0" }, |
1330 | [pcxu_] = { "PA8200 (PCX-U+)", "2.0" }, | 1330 | [pcxu_] = { "PA8200 (PCX-U+)", "2.0" }, |
1331 | [pcxw] = { "PA8500 (PCX-W)", "2.0" }, | 1331 | [pcxw] = { "PA8500 (PCX-W)", "2.0" }, |
1332 | [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, | 1332 | [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, |
1333 | [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, | 1333 | [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, |
1334 | [mako] = { "PA8800 (Mako)", "2.0" }, | 1334 | [mako] = { "PA8800 (Mako)", "2.0" }, |
1335 | [mako2] = { "PA8900 (Shortfin)", "2.0" } | 1335 | [mako2] = { "PA8900 (Shortfin)","2.0" } |
1336 | }; | 1336 | }; |
1337 | 1337 | ||
1338 | const char *parisc_hardware_description(struct parisc_device_id *id) | 1338 | const char * __init parisc_hardware_description(struct parisc_device_id *id) |
1339 | { | 1339 | { |
1340 | struct hp_hardware *listptr; | 1340 | struct hp_hardware *listptr; |
1341 | 1341 | ||
@@ -1373,7 +1373,7 @@ const char *parisc_hardware_description(struct parisc_device_id *id) | |||
1373 | 1373 | ||
1374 | 1374 | ||
1375 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ | 1375 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ |
1376 | enum cpu_type | 1376 | enum cpu_type __init |
1377 | parisc_get_cpu_type(unsigned long hversion) | 1377 | parisc_get_cpu_type(unsigned long hversion) |
1378 | { | 1378 | { |
1379 | struct hp_cpu_type_mask *ptr; | 1379 | struct hp_cpu_type_mask *ptr; |