Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b86db40e authored by Helge Deller's avatar Helge Deller
Browse files

parisc: Move various functions and strings to init section



Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent d5b59a71
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -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);
}
+6 −6
Original line number Diff line number Diff line
@@ -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 */
@@ -1335,7 +1335,7 @@ const char * const cpu_name_version[][2] = {
	[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;