Commit a96b2042 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman

[PATCH] Driver Core: Rearrange exports in platform.c

Driver core: rearrange exports in platform.c

The new way is to specify export right after symbol definition.
Rearrange exports to follow new style to avoid mixing two styles
in one file.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 93ce3061
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
struct device platform_bus = { struct device platform_bus = {
.bus_id = "platform", .bus_id = "platform",
}; };
EXPORT_SYMBOL_GPL(platform_bus);
/** /**
* platform_get_resource - get a resource for a device * platform_get_resource - get a resource for a device
...@@ -49,6 +50,7 @@ platform_get_resource(struct platform_device *dev, unsigned int type, ...@@ -49,6 +50,7 @@ platform_get_resource(struct platform_device *dev, unsigned int type,
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(platform_get_resource);
/** /**
* platform_get_irq - get an IRQ for a device * platform_get_irq - get an IRQ for a device
...@@ -61,6 +63,7 @@ int platform_get_irq(struct platform_device *dev, unsigned int num) ...@@ -61,6 +63,7 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
return r ? r->start : 0; return r ? r->start : 0;
} }
EXPORT_SYMBOL_GPL(platform_get_irq);
/** /**
* platform_get_resource_byname - get a resource for a device by name * platform_get_resource_byname - get a resource for a device by name
...@@ -84,6 +87,7 @@ platform_get_resource_byname(struct platform_device *dev, unsigned int type, ...@@ -84,6 +87,7 @@ platform_get_resource_byname(struct platform_device *dev, unsigned int type,
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(platform_get_resource_byname);
/** /**
* platform_get_irq - get an IRQ for a device * platform_get_irq - get an IRQ for a device
...@@ -96,6 +100,7 @@ int platform_get_irq_byname(struct platform_device *dev, char *name) ...@@ -96,6 +100,7 @@ int platform_get_irq_byname(struct platform_device *dev, char *name)
return r ? r->start : 0; return r ? r->start : 0;
} }
EXPORT_SYMBOL_GPL(platform_get_irq_byname);
/** /**
* platform_add_devices - add a numbers of platform devices * platform_add_devices - add a numbers of platform devices
...@@ -117,6 +122,7 @@ int platform_add_devices(struct platform_device **devs, int num) ...@@ -117,6 +122,7 @@ int platform_add_devices(struct platform_device **devs, int num)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(platform_add_devices);
struct platform_object { struct platform_object {
struct platform_device pdev; struct platform_device pdev;
...@@ -314,6 +320,7 @@ int platform_device_register(struct platform_device * pdev) ...@@ -314,6 +320,7 @@ int platform_device_register(struct platform_device * pdev)
device_initialize(&pdev->dev); device_initialize(&pdev->dev);
return platform_device_add(pdev); return platform_device_add(pdev);
} }
EXPORT_SYMBOL_GPL(platform_device_register);
/** /**
* platform_device_unregister - unregister a platform-level device * platform_device_unregister - unregister a platform-level device
...@@ -328,6 +335,7 @@ void platform_device_unregister(struct platform_device * pdev) ...@@ -328,6 +335,7 @@ void platform_device_unregister(struct platform_device * pdev)
platform_device_del(pdev); platform_device_del(pdev);
platform_device_put(pdev); platform_device_put(pdev);
} }
EXPORT_SYMBOL_GPL(platform_device_unregister);
/** /**
* platform_device_register_simple * platform_device_register_simple
...@@ -370,6 +378,7 @@ struct platform_device *platform_device_register_simple(char *name, unsigned int ...@@ -370,6 +378,7 @@ struct platform_device *platform_device_register_simple(char *name, unsigned int
platform_device_put(pdev); platform_device_put(pdev);
return ERR_PTR(retval); return ERR_PTR(retval);
} }
EXPORT_SYMBOL_GPL(platform_device_register_simple);
static int platform_drv_probe(struct device *_dev) static int platform_drv_probe(struct device *_dev)
{ {
...@@ -491,6 +500,7 @@ struct bus_type platform_bus_type = { ...@@ -491,6 +500,7 @@ struct bus_type platform_bus_type = {
.suspend = platform_suspend, .suspend = platform_suspend,
.resume = platform_resume, .resume = platform_resume,
}; };
EXPORT_SYMBOL_GPL(platform_bus_type);
int __init platform_bus_init(void) int __init platform_bus_init(void)
{ {
...@@ -519,14 +529,3 @@ u64 dma_get_required_mask(struct device *dev) ...@@ -519,14 +529,3 @@ u64 dma_get_required_mask(struct device *dev)
} }
EXPORT_SYMBOL_GPL(dma_get_required_mask); EXPORT_SYMBOL_GPL(dma_get_required_mask);
#endif #endif
EXPORT_SYMBOL_GPL(platform_bus);
EXPORT_SYMBOL_GPL(platform_bus_type);
EXPORT_SYMBOL_GPL(platform_add_devices);
EXPORT_SYMBOL_GPL(platform_device_register);
EXPORT_SYMBOL_GPL(platform_device_register_simple);
EXPORT_SYMBOL_GPL(platform_device_unregister);
EXPORT_SYMBOL_GPL(platform_get_irq);
EXPORT_SYMBOL_GPL(platform_get_resource);
EXPORT_SYMBOL_GPL(platform_get_irq_byname);
EXPORT_SYMBOL_GPL(platform_get_resource_byname);
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