Commit 868dee91 authored by Thomas Abraham's avatar Thomas Abraham Committed by Kukjin Kim

ARM: SAMSUNG: Remove pdev pointer parameter from spi gpio setup functions

The platform data pointer that is passed to the spi gpio setup functions
is not used. Hence, this parameter is removed from all the spi gpio setup
functions.
Signed-off-by: default avatarThomas Abraham <thomas.abraham@linaro.org>
Acked-by: default avatarJaswinder Singh <jaswinder.singh@linaro.org>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent a5238e36
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
*/ */
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#ifdef CONFIG_S3C64XX_DEV_SPI0 #ifdef CONFIG_S3C64XX_DEV_SPI0
int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) int s3c64xx_spi0_cfg_gpio(void)
{ {
s3c_gpio_cfgpin(EXYNOS4_GPB(0), S3C_GPIO_SFN(2)); s3c_gpio_cfgpin(EXYNOS4_GPB(0), S3C_GPIO_SFN(2));
s3c_gpio_setpull(EXYNOS4_GPB(0), S3C_GPIO_PULL_UP); s3c_gpio_setpull(EXYNOS4_GPB(0), S3C_GPIO_PULL_UP);
...@@ -25,7 +23,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) ...@@ -25,7 +23,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev)
#endif #endif
#ifdef CONFIG_S3C64XX_DEV_SPI1 #ifdef CONFIG_S3C64XX_DEV_SPI1
int s3c64xx_spi1_cfg_gpio(struct platform_device *dev) int s3c64xx_spi1_cfg_gpio(void)
{ {
s3c_gpio_cfgpin(EXYNOS4_GPB(4), S3C_GPIO_SFN(2)); s3c_gpio_cfgpin(EXYNOS4_GPB(4), S3C_GPIO_SFN(2));
s3c_gpio_setpull(EXYNOS4_GPB(4), S3C_GPIO_PULL_UP); s3c_gpio_setpull(EXYNOS4_GPB(4), S3C_GPIO_PULL_UP);
...@@ -36,7 +34,7 @@ int s3c64xx_spi1_cfg_gpio(struct platform_device *dev) ...@@ -36,7 +34,7 @@ int s3c64xx_spi1_cfg_gpio(struct platform_device *dev)
#endif #endif
#ifdef CONFIG_S3C64XX_DEV_SPI2 #ifdef CONFIG_S3C64XX_DEV_SPI2
int s3c64xx_spi2_cfg_gpio(struct platform_device *dev) int s3c64xx_spi2_cfg_gpio(void)
{ {
s3c_gpio_cfgpin(EXYNOS4_GPC1(1), S3C_GPIO_SFN(5)); s3c_gpio_cfgpin(EXYNOS4_GPC1(1), S3C_GPIO_SFN(5));
s3c_gpio_setpull(EXYNOS4_GPC1(1), S3C_GPIO_PULL_UP); s3c_gpio_setpull(EXYNOS4_GPC1(1), S3C_GPIO_PULL_UP);
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#ifdef CONFIG_S3C64XX_DEV_SPI0 #ifdef CONFIG_S3C64XX_DEV_SPI0
int s3c64xx_spi0_cfg_gpio(struct platform_device *pdev) int s3c64xx_spi0_cfg_gpio(void)
{ {
/* enable hsspi bit in misccr */ /* enable hsspi bit in misccr */
s3c2410_modify_misccr(S3C2416_MISCCR_HSSPI_EN2, 1); s3c2410_modify_misccr(S3C2416_MISCCR_HSSPI_EN2, 1);
......
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
*/ */
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#ifdef CONFIG_S3C64XX_DEV_SPI0 #ifdef CONFIG_S3C64XX_DEV_SPI0
int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) int s3c64xx_spi0_cfg_gpio(void)
{ {
s3c_gpio_cfgall_range(S3C64XX_GPC(0), 3, s3c_gpio_cfgall_range(S3C64XX_GPC(0), 3,
S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
...@@ -23,7 +21,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) ...@@ -23,7 +21,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev)
#endif #endif
#ifdef CONFIG_S3C64XX_DEV_SPI1 #ifdef CONFIG_S3C64XX_DEV_SPI1
int s3c64xx_spi1_cfg_gpio(struct platform_device *dev) int s3c64xx_spi1_cfg_gpio(void)
{ {
s3c_gpio_cfgall_range(S3C64XX_GPC(4), 3, s3c_gpio_cfgall_range(S3C64XX_GPC(4), 3,
S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
......
...@@ -9,11 +9,10 @@ ...@@ -9,11 +9,10 @@
*/ */
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#ifdef CONFIG_S3C64XX_DEV_SPI0 #ifdef CONFIG_S3C64XX_DEV_SPI0
int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) int s3c64xx_spi0_cfg_gpio(void)
{ {
if (soc_is_s5p6450()) if (soc_is_s5p6450())
s3c_gpio_cfgall_range(S5P6450_GPC(0), 3, s3c_gpio_cfgall_range(S5P6450_GPC(0), 3,
...@@ -26,7 +25,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) ...@@ -26,7 +25,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev)
#endif #endif
#ifdef CONFIG_S3C64XX_DEV_SPI1 #ifdef CONFIG_S3C64XX_DEV_SPI1
int s3c64xx_spi1_cfg_gpio(struct platform_device *dev) int s3c64xx_spi1_cfg_gpio(void)
{ {
if (soc_is_s5p6450()) if (soc_is_s5p6450())
s3c_gpio_cfgall_range(S5P6450_GPC(4), 3, s3c_gpio_cfgall_range(S5P6450_GPC(4), 3,
......
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
*/ */
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#ifdef CONFIG_S3C64XX_DEV_SPI0 #ifdef CONFIG_S3C64XX_DEV_SPI0
int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) int s3c64xx_spi0_cfg_gpio(void)
{ {
s3c_gpio_cfgall_range(S5PC100_GPB(0), 3, s3c_gpio_cfgall_range(S5PC100_GPB(0), 3,
S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
...@@ -23,7 +21,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) ...@@ -23,7 +21,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev)
#endif #endif
#ifdef CONFIG_S3C64XX_DEV_SPI1 #ifdef CONFIG_S3C64XX_DEV_SPI1
int s3c64xx_spi1_cfg_gpio(struct platform_device *dev) int s3c64xx_spi1_cfg_gpio(void)
{ {
s3c_gpio_cfgall_range(S5PC100_GPB(4), 3, s3c_gpio_cfgall_range(S5PC100_GPB(4), 3,
S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
...@@ -32,7 +30,7 @@ int s3c64xx_spi1_cfg_gpio(struct platform_device *dev) ...@@ -32,7 +30,7 @@ int s3c64xx_spi1_cfg_gpio(struct platform_device *dev)
#endif #endif
#ifdef CONFIG_S3C64XX_DEV_SPI2 #ifdef CONFIG_S3C64XX_DEV_SPI2
int s3c64xx_spi2_cfg_gpio(struct platform_device *dev) int s3c64xx_spi2_cfg_gpio(void)
{ {
s3c_gpio_cfgpin(S5PC100_GPG3(0), S3C_GPIO_SFN(3)); s3c_gpio_cfgpin(S5PC100_GPG3(0), S3C_GPIO_SFN(3));
s3c_gpio_setpull(S5PC100_GPG3(0), S3C_GPIO_PULL_UP); s3c_gpio_setpull(S5PC100_GPG3(0), S3C_GPIO_PULL_UP);
......
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
*/ */
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#ifdef CONFIG_S3C64XX_DEV_SPI0 #ifdef CONFIG_S3C64XX_DEV_SPI0
int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) int s3c64xx_spi0_cfg_gpio(void)
{ {
s3c_gpio_cfgpin(S5PV210_GPB(0), S3C_GPIO_SFN(2)); s3c_gpio_cfgpin(S5PV210_GPB(0), S3C_GPIO_SFN(2));
s3c_gpio_setpull(S5PV210_GPB(0), S3C_GPIO_PULL_UP); s3c_gpio_setpull(S5PV210_GPB(0), S3C_GPIO_PULL_UP);
...@@ -25,7 +23,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev) ...@@ -25,7 +23,7 @@ int s3c64xx_spi0_cfg_gpio(struct platform_device *dev)
#endif #endif
#ifdef CONFIG_S3C64XX_DEV_SPI1 #ifdef CONFIG_S3C64XX_DEV_SPI1
int s3c64xx_spi1_cfg_gpio(struct platform_device *dev) int s3c64xx_spi1_cfg_gpio(void)
{ {
s3c_gpio_cfgpin(S5PV210_GPB(4), S3C_GPIO_SFN(2)); s3c_gpio_cfgpin(S5PV210_GPB(4), S3C_GPIO_SFN(2));
s3c_gpio_setpull(S5PV210_GPB(4), S3C_GPIO_PULL_UP); s3c_gpio_setpull(S5PV210_GPB(4), S3C_GPIO_PULL_UP);
......
...@@ -39,7 +39,7 @@ struct s3c64xx_spi_csinfo { ...@@ -39,7 +39,7 @@ struct s3c64xx_spi_csinfo {
struct s3c64xx_spi_info { struct s3c64xx_spi_info {
int src_clk_nr; int src_clk_nr;
int num_cs; int num_cs;
int (*cfg_gpio)(struct platform_device *pdev); int (*cfg_gpio)(void);
}; };
/** /**
...@@ -60,9 +60,9 @@ extern void s3c64xx_spi2_set_platdata(struct s3c64xx_spi_info *pd, ...@@ -60,9 +60,9 @@ extern void s3c64xx_spi2_set_platdata(struct s3c64xx_spi_info *pd,
int src_clk_nr, int num_cs); int src_clk_nr, int num_cs);
/* defined by architecture to configure gpio */ /* defined by architecture to configure gpio */
extern int s3c64xx_spi0_cfg_gpio(struct platform_device *dev); extern int s3c64xx_spi0_cfg_gpio(void);
extern int s3c64xx_spi1_cfg_gpio(struct platform_device *dev); extern int s3c64xx_spi1_cfg_gpio(void);
extern int s3c64xx_spi2_cfg_gpio(struct platform_device *dev); extern int s3c64xx_spi2_cfg_gpio(void);
extern struct s3c64xx_spi_info s3c64xx_spi0_pdata; extern struct s3c64xx_spi_info s3c64xx_spi0_pdata;
extern struct s3c64xx_spi_info s3c64xx_spi1_pdata; extern struct s3c64xx_spi_info s3c64xx_spi1_pdata;
......
...@@ -1071,7 +1071,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev) ...@@ -1071,7 +1071,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
goto err1; goto err1;
} }
if (sci->cfg_gpio == NULL || sci->cfg_gpio(pdev)) { if (sci->cfg_gpio == NULL || sci->cfg_gpio()) {
dev_err(&pdev->dev, "Unable to config gpio\n"); dev_err(&pdev->dev, "Unable to config gpio\n");
ret = -EBUSY; ret = -EBUSY;
goto err2; goto err2;
...@@ -1214,12 +1214,11 @@ static int s3c64xx_spi_suspend(struct device *dev) ...@@ -1214,12 +1214,11 @@ static int s3c64xx_spi_suspend(struct device *dev)
static int s3c64xx_spi_resume(struct device *dev) static int s3c64xx_spi_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev);
struct spi_master *master = spi_master_get(dev_get_drvdata(dev)); struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master); struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
struct s3c64xx_spi_info *sci = sdd->cntrlr_info; struct s3c64xx_spi_info *sci = sdd->cntrlr_info;
sci->cfg_gpio(pdev); sci->cfg_gpio();
/* Enable the clock */ /* Enable the clock */
clk_enable(sdd->src_clk); clk_enable(sdd->src_clk);
......
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