Commit 0845e1f2 authored by Sebastian Reichel's avatar Sebastian Reichel

HSI: omap_ssi: make sure probe stays available

device can be unbind/rebind, so probe should
stay available.
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent f704e110
...@@ -140,7 +140,7 @@ static const struct file_operations ssi_gdd_regs_fops = { ...@@ -140,7 +140,7 @@ static const struct file_operations ssi_gdd_regs_fops = {
.release = single_release, .release = single_release,
}; };
static int __init ssi_debug_add_ctrl(struct hsi_controller *ssi) static int ssi_debug_add_ctrl(struct hsi_controller *ssi)
{ {
struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi);
struct dentry *dir; struct dentry *dir;
...@@ -290,7 +290,7 @@ static unsigned long ssi_get_clk_rate(struct hsi_controller *ssi) ...@@ -290,7 +290,7 @@ static unsigned long ssi_get_clk_rate(struct hsi_controller *ssi)
return rate; return rate;
} }
static int __init ssi_get_iomem(struct platform_device *pd, static int ssi_get_iomem(struct platform_device *pd,
const char *name, void __iomem **pbase, dma_addr_t *phy) const char *name, void __iomem **pbase, dma_addr_t *phy)
{ {
struct resource *mem; struct resource *mem;
...@@ -310,7 +310,7 @@ static int __init ssi_get_iomem(struct platform_device *pd, ...@@ -310,7 +310,7 @@ static int __init ssi_get_iomem(struct platform_device *pd,
return 0; return 0;
} }
static int __init ssi_add_controller(struct hsi_controller *ssi, static int ssi_add_controller(struct hsi_controller *ssi,
struct platform_device *pd) struct platform_device *pd)
{ {
struct omap_ssi_controller *omap_ssi; struct omap_ssi_controller *omap_ssi;
...@@ -386,7 +386,7 @@ static int __init ssi_add_controller(struct hsi_controller *ssi, ...@@ -386,7 +386,7 @@ static int __init ssi_add_controller(struct hsi_controller *ssi,
return err; return err;
} }
static int __init ssi_hw_init(struct hsi_controller *ssi) static int ssi_hw_init(struct hsi_controller *ssi)
{ {
struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi);
unsigned int i; unsigned int i;
...@@ -456,7 +456,7 @@ static int ssi_remove_ports(struct device *dev, void *c) ...@@ -456,7 +456,7 @@ static int ssi_remove_ports(struct device *dev, void *c)
return 0; return 0;
} }
static int __init ssi_probe(struct platform_device *pd) static int ssi_probe(struct platform_device *pd)
{ {
struct platform_device *childpdev; struct platform_device *childpdev;
struct device_node *np = pd->dev.of_node; struct device_node *np = pd->dev.of_node;
...@@ -522,7 +522,7 @@ static int __init ssi_probe(struct platform_device *pd) ...@@ -522,7 +522,7 @@ static int __init ssi_probe(struct platform_device *pd)
return err; return err;
} }
static int __exit ssi_remove(struct platform_device *pd) static int ssi_remove(struct platform_device *pd)
{ {
struct hsi_controller *ssi = platform_get_drvdata(pd); struct hsi_controller *ssi = platform_get_drvdata(pd);
...@@ -592,7 +592,8 @@ MODULE_DEVICE_TABLE(of, omap_ssi_of_match); ...@@ -592,7 +592,8 @@ MODULE_DEVICE_TABLE(of, omap_ssi_of_match);
#endif #endif
static struct platform_driver ssi_pdriver = { static struct platform_driver ssi_pdriver = {
.remove = __exit_p(ssi_remove), .probe = ssi_probe,
.remove = ssi_remove,
.driver = { .driver = {
.name = "omap_ssi", .name = "omap_ssi",
.pm = DEV_PM_OPS, .pm = DEV_PM_OPS,
...@@ -600,7 +601,7 @@ static struct platform_driver ssi_pdriver = { ...@@ -600,7 +601,7 @@ static struct platform_driver ssi_pdriver = {
}, },
}; };
module_platform_driver_probe(ssi_pdriver, ssi_probe); module_platform_driver(ssi_pdriver);
MODULE_ALIAS("platform:omap_ssi"); MODULE_ALIAS("platform:omap_ssi");
MODULE_AUTHOR("Carlos Chinea <carlos.chinea@nokia.com>"); MODULE_AUTHOR("Carlos Chinea <carlos.chinea@nokia.com>");
......
...@@ -171,7 +171,7 @@ static int ssi_div_set(void *data, u64 val) ...@@ -171,7 +171,7 @@ static int ssi_div_set(void *data, u64 val)
DEFINE_SIMPLE_ATTRIBUTE(ssi_sst_div_fops, ssi_div_get, ssi_div_set, "%llu\n"); DEFINE_SIMPLE_ATTRIBUTE(ssi_sst_div_fops, ssi_div_get, ssi_div_set, "%llu\n");
static int __init ssi_debug_add_port(struct omap_ssi_port *omap_port, static int ssi_debug_add_port(struct omap_ssi_port *omap_port,
struct dentry *dir) struct dentry *dir)
{ {
struct hsi_port *port = to_hsi_port(omap_port->dev); struct hsi_port *port = to_hsi_port(omap_port->dev);
...@@ -1007,7 +1007,7 @@ static irqreturn_t ssi_wake_isr(int irq __maybe_unused, void *ssi_port) ...@@ -1007,7 +1007,7 @@ static irqreturn_t ssi_wake_isr(int irq __maybe_unused, void *ssi_port)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int __init ssi_port_irq(struct hsi_port *port, static int ssi_port_irq(struct hsi_port *port,
struct platform_device *pd) struct platform_device *pd)
{ {
struct omap_ssi_port *omap_port = hsi_port_drvdata(port); struct omap_ssi_port *omap_port = hsi_port_drvdata(port);
...@@ -1029,7 +1029,7 @@ static int __init ssi_port_irq(struct hsi_port *port, ...@@ -1029,7 +1029,7 @@ static int __init ssi_port_irq(struct hsi_port *port,
return err; return err;
} }
static int __init ssi_wake_irq(struct hsi_port *port, static int ssi_wake_irq(struct hsi_port *port,
struct platform_device *pd) struct platform_device *pd)
{ {
struct omap_ssi_port *omap_port = hsi_port_drvdata(port); struct omap_ssi_port *omap_port = hsi_port_drvdata(port);
...@@ -1060,7 +1060,7 @@ static int __init ssi_wake_irq(struct hsi_port *port, ...@@ -1060,7 +1060,7 @@ static int __init ssi_wake_irq(struct hsi_port *port,
return err; return err;
} }
static void __init ssi_queues_init(struct omap_ssi_port *omap_port) static void ssi_queues_init(struct omap_ssi_port *omap_port)
{ {
unsigned int ch; unsigned int ch;
...@@ -1071,7 +1071,7 @@ static void __init ssi_queues_init(struct omap_ssi_port *omap_port) ...@@ -1071,7 +1071,7 @@ static void __init ssi_queues_init(struct omap_ssi_port *omap_port)
INIT_LIST_HEAD(&omap_port->brkqueue); INIT_LIST_HEAD(&omap_port->brkqueue);
} }
static int __init ssi_port_get_iomem(struct platform_device *pd, static int ssi_port_get_iomem(struct platform_device *pd,
const char *name, void __iomem **pbase, dma_addr_t *phy) const char *name, void __iomem **pbase, dma_addr_t *phy)
{ {
struct hsi_port *port = platform_get_drvdata(pd); struct hsi_port *port = platform_get_drvdata(pd);
...@@ -1104,7 +1104,7 @@ static int __init ssi_port_get_iomem(struct platform_device *pd, ...@@ -1104,7 +1104,7 @@ static int __init ssi_port_get_iomem(struct platform_device *pd,
return 0; return 0;
} }
static int __init ssi_port_probe(struct platform_device *pd) static int ssi_port_probe(struct platform_device *pd)
{ {
struct device_node *np = pd->dev.of_node; struct device_node *np = pd->dev.of_node;
struct hsi_port *port; struct hsi_port *port;
...@@ -1217,7 +1217,7 @@ static int __init ssi_port_probe(struct platform_device *pd) ...@@ -1217,7 +1217,7 @@ static int __init ssi_port_probe(struct platform_device *pd)
return err; return err;
} }
static int __exit ssi_port_remove(struct platform_device *pd) static int ssi_port_remove(struct platform_device *pd)
{ {
struct hsi_port *port = platform_get_drvdata(pd); struct hsi_port *port = platform_get_drvdata(pd);
struct omap_ssi_port *omap_port = hsi_port_drvdata(port); struct omap_ssi_port *omap_port = hsi_port_drvdata(port);
...@@ -1370,7 +1370,8 @@ MODULE_DEVICE_TABLE(of, omap_ssi_port_of_match); ...@@ -1370,7 +1370,8 @@ MODULE_DEVICE_TABLE(of, omap_ssi_port_of_match);
#endif #endif
static struct platform_driver ssi_port_pdriver = { static struct platform_driver ssi_port_pdriver = {
.remove = __exit_p(ssi_port_remove), .probe = ssi_port_probe,
.remove = ssi_port_remove,
.driver = { .driver = {
.name = "omap_ssi_port", .name = "omap_ssi_port",
.of_match_table = omap_ssi_port_of_match, .of_match_table = omap_ssi_port_of_match,
...@@ -1378,7 +1379,7 @@ static struct platform_driver ssi_port_pdriver = { ...@@ -1378,7 +1379,7 @@ static struct platform_driver ssi_port_pdriver = {
}, },
}; };
module_platform_driver_probe(ssi_port_pdriver, ssi_port_probe); module_platform_driver(ssi_port_pdriver);
MODULE_ALIAS("platform:omap_ssi_port"); MODULE_ALIAS("platform:omap_ssi_port");
MODULE_AUTHOR("Carlos Chinea <carlos.chinea@nokia.com>"); MODULE_AUTHOR("Carlos Chinea <carlos.chinea@nokia.com>");
......
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