]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
parisc: Move various functions and strings to init section
authorHelge Deller <deller@gmx.de>
Sun, 4 Mar 2018 21:26:11 +0000 (22:26 +0100)
committerHelge Deller <deller@gmx.de>
Tue, 27 Mar 2018 16:52:21 +0000 (18:52 +0200)
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/drivers.c
arch/parisc/kernel/hardware.c

index 29b99b8964aa6c3171d7633ab9863014510330f5..d4256145b74c90babb2f467e00518e5e8911f5fc 100644 (file)
@@ -135,7 +135,7 @@ static int parisc_driver_probe(struct device *dev)
        return rc;
 }
 
-static int parisc_driver_remove(struct device *dev)
+static int __exit parisc_driver_remove(struct device *dev)
 {
        struct parisc_device *pa_dev = to_parisc_device(dev);
        struct parisc_driver *pa_drv = to_parisc_driver(dev->driver);
@@ -205,7 +205,7 @@ static int match_and_count(struct device * dev, void * data)
  * Use by IOMMU support to "guess" the right size IOPdir.
  * Formula is something like memsize/(num_iommu * entry_size).
  */
-int count_parisc_driver(struct parisc_driver *driver)
+int __init count_parisc_driver(struct parisc_driver *driver)
 {
        struct match_count m = {
                .driver = driver,
@@ -268,7 +268,7 @@ static struct parisc_device *find_device_by_addr(unsigned long hpa)
  * Walks up the device tree looking for a device of the specified type.
  * If it finds it, it returns it.  If not, it returns NULL.
  */
-const struct parisc_device *
+const struct parisc_device * __init
 find_pa_parent_type(const struct parisc_device *padev, int type)
 {
        const struct device *dev = &padev->dev;
@@ -397,7 +397,7 @@ static void setup_bus_id(struct parisc_device *padev)
        dev_set_name(&padev->dev, name);
 }
 
-struct parisc_device * create_tree_node(char id, struct device *parent)
+struct parisc_device * __init create_tree_node(char id, struct device *parent)
 {
        struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
        if (!dev)
@@ -471,7 +471,7 @@ static struct parisc_device *create_parisc_device(struct hardware_path *modpath)
        return alloc_tree_node(parent, modpath->mod);
 }
 
-struct parisc_device *
+struct parisc_device * __init
 alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
 {
        int status;
@@ -609,7 +609,7 @@ struct bus_type parisc_bus_type = {
        .uevent = parisc_uevent,
        .dev_groups = parisc_device_groups,
        .probe = parisc_driver_probe,
-       .remove = parisc_driver_remove,
+       .remove = __exit_p(parisc_driver_remove),
 };
 
 /**
@@ -619,7 +619,7 @@ struct bus_type parisc_bus_type = {
  * Search the driver list for a driver that is willing to manage
  * this device.
  */
-int register_parisc_device(struct parisc_device *dev)
+int __init register_parisc_device(struct parisc_device *dev)
 {
        if (!dev)
                return 0;
@@ -791,7 +791,7 @@ EXPORT_SYMBOL(device_to_hwpath);
 static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
                             struct device *parent);
 
-void walk_lower_bus(struct parisc_device *dev)
+static void walk_lower_bus(struct parisc_device *dev)
 {
        unsigned long io_io_low, io_io_high;
 
@@ -857,7 +857,7 @@ static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
  * PDC doesn't tell us about all devices in the system.  This routine
  * finds devices connected to the central bus.
  */
-void walk_central_bus(void)
+void __init walk_central_bus(void)
 {
        walk_native_bus(CENTRAL_BUS_ADDR,
                        CENTRAL_BUS_ADDR + (MAX_NATIVE_DEVICES * NATIVE_DEVICE_OFFSET),
@@ -886,7 +886,7 @@ static void print_parisc_device(struct parisc_device *dev)
 /**
  * init_parisc_bus - Some preparation to be done before inventory
  */
-void init_parisc_bus(void)
+void __init init_parisc_bus(void)
 {
        if (bus_register(&parisc_bus_type))
                panic("Could not register PA-RISC bus type\n");
@@ -908,7 +908,7 @@ static int print_one_device(struct device * dev, void * data)
 /**
  * print_parisc_devices - Print out a list of devices found in this system
  */
-void print_parisc_devices(void)
+void __init print_parisc_devices(void)
 {
        for_each_padev(print_one_device, NULL);
 }
index af3bc359dc706568b344eea8a9f470d14f4d8b3b..a2058953a53f833fa86010f12665ed9a6bfd6733 100644 (file)
@@ -41,7 +41,7 @@
  *     are guessed. If you know the correct name, please let us know.
  */
  
-static struct hp_hardware hp_hardware_list[] = {
+static struct hp_hardware hp_hardware_list[] __initdata = {
        {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
        {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
        {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
@@ -1238,7 +1238,7 @@ static struct hp_cpu_type_mask {
        unsigned short model;
        unsigned short mask;
        enum cpu_type cpu;
-} hp_cpu_type_mask_list[] = {
+} hp_cpu_type_mask_list[] __initdata = {
 
        { 0x0000, 0x0ff0, pcx    },  /* 0x0000 - 0x000f */
        { 0x0048, 0x0ff0, pcxl   },  /* 0x0040 - 0x004f */
@@ -1325,17 +1325,17 @@ const char * const cpu_name_version[][2] = {
        [pcxt]  = { "PA7100 (PCX-T)",   "1.1b" },
        [pcxt_] = { "PA7200 (PCX-T')",  "1.1c" },
        [pcxl]  = { "PA7100LC (PCX-L)", "1.1d" },
-       [pcxl2] = { "PA7300LC (PCX-L2)",        "1.1e" },
+       [pcxl2] = { "PA7300LC (PCX-L2)","1.1e" },
        [pcxu]  = { "PA8000 (PCX-U)",   "2.0" },
        [pcxu_] = { "PA8200 (PCX-U+)",  "2.0" },
        [pcxw]  = { "PA8500 (PCX-W)",   "2.0" },
        [pcxw_] = { "PA8600 (PCX-W+)",  "2.0" },
        [pcxw2] = { "PA8700 (PCX-W2)",  "2.0" },
        [mako]  = { "PA8800 (Mako)",    "2.0" },
-       [mako2] = { "PA8900 (Shortfin)",        "2.0" }
+       [mako2] = { "PA8900 (Shortfin)","2.0" }
 };
 
-const char *parisc_hardware_description(struct parisc_device_id *id)
+const char * __init parisc_hardware_description(struct parisc_device_id *id)
 {
        struct hp_hardware *listptr;
        
@@ -1373,7 +1373,7 @@ const char *parisc_hardware_description(struct parisc_device_id *id)
 
 
 /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
-enum cpu_type
+enum cpu_type __init
 parisc_get_cpu_type(unsigned long hversion)
 {
        struct hp_cpu_type_mask *ptr;