Commit baffe169 authored by Haojian Zhuang's avatar Haojian Zhuang Committed by Eric Miao

[ARM] pxa: add namespace on ssp

In order to prevent code ambiguous, add namespace on functions in ssp driver.
Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 2503991a
...@@ -159,28 +159,28 @@ struct ssp_device { ...@@ -159,28 +159,28 @@ struct ssp_device {
}; };
/** /**
* ssp_write_reg - Write to a SSP register * pxa_ssp_write_reg - Write to a SSP register
* *
* @dev: SSP device to access * @dev: SSP device to access
* @reg: Register to write to * @reg: Register to write to
* @val: Value to be written. * @val: Value to be written.
*/ */
static inline void ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val) static inline void pxa_ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val)
{ {
__raw_writel(val, dev->mmio_base + reg); __raw_writel(val, dev->mmio_base + reg);
} }
/** /**
* ssp_read_reg - Read from a SSP register * pxa_ssp_read_reg - Read from a SSP register
* *
* @dev: SSP device to access * @dev: SSP device to access
* @reg: Register to read from * @reg: Register to read from
*/ */
static inline u32 ssp_read_reg(struct ssp_device *dev, u32 reg) static inline u32 pxa_ssp_read_reg(struct ssp_device *dev, u32 reg)
{ {
return __raw_readl(dev->mmio_base + reg); return __raw_readl(dev->mmio_base + reg);
} }
struct ssp_device *ssp_request(int port, const char *label); struct ssp_device *pxa_ssp_request(int port, const char *label);
void ssp_free(struct ssp_device *); void pxa_ssp_free(struct ssp_device *);
#endif /* __ASM_ARCH_SSP_H */ #endif /* __ASM_ARCH_SSP_H */
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
static DEFINE_MUTEX(ssp_lock); static DEFINE_MUTEX(ssp_lock);
static LIST_HEAD(ssp_list); static LIST_HEAD(ssp_list);
struct ssp_device *ssp_request(int port, const char *label) struct ssp_device *pxa_ssp_request(int port, const char *label)
{ {
struct ssp_device *ssp = NULL; struct ssp_device *ssp = NULL;
...@@ -58,9 +58,9 @@ struct ssp_device *ssp_request(int port, const char *label) ...@@ -58,9 +58,9 @@ struct ssp_device *ssp_request(int port, const char *label)
return ssp; return ssp;
} }
EXPORT_SYMBOL(ssp_request); EXPORT_SYMBOL(pxa_ssp_request);
void ssp_free(struct ssp_device *ssp) void pxa_ssp_free(struct ssp_device *ssp)
{ {
mutex_lock(&ssp_lock); mutex_lock(&ssp_lock);
if (ssp->use_count) { if (ssp->use_count) {
...@@ -70,9 +70,9 @@ void ssp_free(struct ssp_device *ssp) ...@@ -70,9 +70,9 @@ void ssp_free(struct ssp_device *ssp)
dev_err(&ssp->pdev->dev, "device already free\n"); dev_err(&ssp->pdev->dev, "device already free\n");
mutex_unlock(&ssp_lock); mutex_unlock(&ssp_lock);
} }
EXPORT_SYMBOL(ssp_free); EXPORT_SYMBOL(pxa_ssp_free);
static int __devinit ssp_probe(struct platform_device *pdev) static int __devinit pxa_ssp_probe(struct platform_device *pdev)
{ {
const struct platform_device_id *id = platform_get_device_id(pdev); const struct platform_device_id *id = platform_get_device_id(pdev);
struct resource *res; struct resource *res;
...@@ -164,7 +164,7 @@ static int __devinit ssp_probe(struct platform_device *pdev) ...@@ -164,7 +164,7 @@ static int __devinit ssp_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int __devexit ssp_remove(struct platform_device *pdev) static int __devexit pxa_ssp_remove(struct platform_device *pdev)
{ {
struct resource *res; struct resource *res;
struct ssp_device *ssp; struct ssp_device *ssp;
...@@ -196,9 +196,9 @@ static const struct platform_device_id ssp_id_table[] = { ...@@ -196,9 +196,9 @@ static const struct platform_device_id ssp_id_table[] = {
{ }, { },
}; };
static struct platform_driver ssp_driver = { static struct platform_driver pxa_ssp_driver = {
.probe = ssp_probe, .probe = pxa_ssp_probe,
.remove = __devexit_p(ssp_remove), .remove = __devexit_p(pxa_ssp_remove),
.driver = { .driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "pxa2xx-ssp", .name = "pxa2xx-ssp",
...@@ -208,12 +208,12 @@ static struct platform_driver ssp_driver = { ...@@ -208,12 +208,12 @@ static struct platform_driver ssp_driver = {
static int __init pxa_ssp_init(void) static int __init pxa_ssp_init(void)
{ {
return platform_driver_register(&ssp_driver); return platform_driver_register(&pxa_ssp_driver);
} }
static void __exit pxa_ssp_exit(void) static void __exit pxa_ssp_exit(void)
{ {
platform_driver_unregister(&ssp_driver); platform_driver_unregister(&pxa_ssp_driver);
} }
arch_initcall(pxa_ssp_init); arch_initcall(pxa_ssp_init);
......
...@@ -1465,7 +1465,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev) ...@@ -1465,7 +1465,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev)
platform_info = dev->platform_data; platform_info = dev->platform_data;
ssp = ssp_request(pdev->id, pdev->name); ssp = pxa_ssp_request(pdev->id, pdev->name);
if (ssp == NULL) { if (ssp == NULL) {
dev_err(&pdev->dev, "failed to request SSP%d\n", pdev->id); dev_err(&pdev->dev, "failed to request SSP%d\n", pdev->id);
return -ENODEV; return -ENODEV;
...@@ -1475,7 +1475,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev) ...@@ -1475,7 +1475,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev)
master = spi_alloc_master(dev, sizeof(struct driver_data) + 16); master = spi_alloc_master(dev, sizeof(struct driver_data) + 16);
if (!master) { if (!master) {
dev_err(&pdev->dev, "cannot alloc spi_master\n"); dev_err(&pdev->dev, "cannot alloc spi_master\n");
ssp_free(ssp); pxa_ssp_free(ssp);
return -ENOMEM; return -ENOMEM;
} }
drv_data = spi_master_get_devdata(master); drv_data = spi_master_get_devdata(master);
...@@ -1604,7 +1604,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev) ...@@ -1604,7 +1604,7 @@ static int __init pxa2xx_spi_probe(struct platform_device *pdev)
out_error_master_alloc: out_error_master_alloc:
spi_master_put(master); spi_master_put(master);
ssp_free(ssp); pxa_ssp_free(ssp);
return status; return status;
} }
...@@ -1648,7 +1648,7 @@ static int pxa2xx_spi_remove(struct platform_device *pdev) ...@@ -1648,7 +1648,7 @@ static int pxa2xx_spi_remove(struct platform_device *pdev)
free_irq(ssp->irq, drv_data); free_irq(ssp->irq, drv_data);
/* Release SSP */ /* Release SSP */
ssp_free(ssp); pxa_ssp_free(ssp);
/* Disconnect from the SPI framework */ /* Disconnect from the SPI framework */
spi_unregister_master(drv_data->master); spi_unregister_master(drv_data->master);
......
This diff is collapsed.
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