aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-09 17:30:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-09 17:30:28 -0500
commit190a44e65b0f32eaf5b4db3969f5eb224f83a7a2 (patch)
tree577c9a3949ba06e62d082eb11894b7045ebe3ef3 /drivers/spi
parentdfc1ebe76663d582a01c9dc572395cf8086d01de (diff)
parentb48741cce3be32a48af9a2b272f3f13a077375cf (diff)
Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Cleanups for the Samsung platforms Various cleanup changes that the device driver changes are built upon. Since the samsung cleanups depend on the device tree series, which depends on the first set of cleanups for tegra. * tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: EXYNOS: Use gpio_request_one ARM: S5PV210: Use gpio_request_one ARM: S3C64XX: Modified according to SPI consolidation work ARM: S5PV210: Modified files for SPI consolidation work ARM: S5P64X0: Modified files for SPI consolidation work ARM: S5PC100: Modified files for SPI consolidation work ARM: S3C64XX: Modified files for SPI consolidation work ARM: SAMSUNG: Consolidation of SPI platform devices to plat-samsung ARM: SAMSUNG: Remove SPI bus clocks from platform data ARM: S5PV210: Add SPI clkdev support ARM: S5P64X0: Add SPI clkdev support ARM: S5PC100: Add SPI clkdev support ARM: S3C64XX: Add SPI clkdev support spi/s3c64xx: Use bus clocks created using clkdev mmc: sdhci-s3c: Use generic clock names for sdhci bus clock options ARM: SAMSUNG: Add lookup of sdhci-s3c clocks using generic names ARM: SAMSUNG: Remove SDHCI bus clocks from platform data ARM: SAMSUNG: Use kmemdup rather than duplicating its implementation ARM: EXYNOS: remove exynos4_scu_enable()
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-s3c64xx.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 019a7163572f..dcf7e1006426 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -971,6 +971,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
971 struct s3c64xx_spi_info *sci; 971 struct s3c64xx_spi_info *sci;
972 struct spi_master *master; 972 struct spi_master *master;
973 int ret; 973 int ret;
974 char clk_name[16];
974 975
975 if (pdev->id < 0) { 976 if (pdev->id < 0) {
976 dev_err(&pdev->dev, 977 dev_err(&pdev->dev,
@@ -984,11 +985,6 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
984 } 985 }
985 986
986 sci = pdev->dev.platform_data; 987 sci = pdev->dev.platform_data;
987 if (!sci->src_clk_name) {
988 dev_err(&pdev->dev,
989 "Board init must call s3c64xx_spi_set_info()\n");
990 return -EINVAL;
991 }
992 988
993 /* Check for availability of necessary resource */ 989 /* Check for availability of necessary resource */
994 990
@@ -1073,17 +1069,17 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
1073 goto err4; 1069 goto err4;
1074 } 1070 }
1075 1071
1076 sdd->src_clk = clk_get(&pdev->dev, sci->src_clk_name); 1072 sprintf(clk_name, "spi_busclk%d", sci->src_clk_nr);
1073 sdd->src_clk = clk_get(&pdev->dev, clk_name);
1077 if (IS_ERR(sdd->src_clk)) { 1074 if (IS_ERR(sdd->src_clk)) {
1078 dev_err(&pdev->dev, 1075 dev_err(&pdev->dev,
1079 "Unable to acquire clock '%s'\n", sci->src_clk_name); 1076 "Unable to acquire clock '%s'\n", clk_name);
1080 ret = PTR_ERR(sdd->src_clk); 1077 ret = PTR_ERR(sdd->src_clk);
1081 goto err5; 1078 goto err5;
1082 } 1079 }
1083 1080
1084 if (clk_enable(sdd->src_clk)) { 1081 if (clk_enable(sdd->src_clk)) {
1085 dev_err(&pdev->dev, "Couldn't enable clock '%s'\n", 1082 dev_err(&pdev->dev, "Couldn't enable clock '%s'\n", clk_name);
1086 sci->src_clk_name);
1087 ret = -EBUSY; 1083 ret = -EBUSY;
1088 goto err6; 1084 goto err6;
1089 } 1085 }