diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-01-31 01:25:01 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2013-02-05 08:21:54 -0500 |
commit | 75bf3361104157b6dcdadc895329a67b1c4f9617 (patch) | |
tree | b9100ca7082e423150d929d89e4b17d74b3ad3ee /drivers/spi | |
parent | 4eb770067f3ad616d5cc37be4c58eb918fce5062 (diff) |
spi/s3c64xx: fix checkpatch warnings and error
Fix checkpatch warnings and error as below:
ERROR: "foo * bar" should be "foo *bar"
WARNING: please, no space before tabs
WARNING: quoted string split across lines
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 1f2f7f8329f1..d8928d0592df 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -62,7 +62,7 @@ | |||
62 | #define S3C64XX_SPI_CLKSEL_SRCMSK (3<<9) | 62 | #define S3C64XX_SPI_CLKSEL_SRCMSK (3<<9) |
63 | #define S3C64XX_SPI_CLKSEL_SRCSHFT 9 | 63 | #define S3C64XX_SPI_CLKSEL_SRCSHFT 9 |
64 | #define S3C64XX_SPI_ENCLK_ENABLE (1<<8) | 64 | #define S3C64XX_SPI_ENCLK_ENABLE (1<<8) |
65 | #define S3C64XX_SPI_PSR_MASK 0xff | 65 | #define S3C64XX_SPI_PSR_MASK 0xff |
66 | 66 | ||
67 | #define S3C64XX_SPI_MODE_CH_TSZ_BYTE (0<<29) | 67 | #define S3C64XX_SPI_MODE_CH_TSZ_BYTE (0<<29) |
68 | #define S3C64XX_SPI_MODE_CH_TSZ_HALFWORD (1<<29) | 68 | #define S3C64XX_SPI_MODE_CH_TSZ_HALFWORD (1<<29) |
@@ -743,8 +743,7 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master, | |||
743 | sdd->regs + S3C64XX_SPI_SLAVE_SEL); | 743 | sdd->regs + S3C64XX_SPI_SLAVE_SEL); |
744 | 744 | ||
745 | if (status) { | 745 | if (status) { |
746 | dev_err(&spi->dev, "I/O Error: " | 746 | dev_err(&spi->dev, "I/O Error: rx-%d tx-%d res:rx-%c tx-%c len-%d\n", |
747 | "rx-%d tx-%d res:rx-%c tx-%c len-%d\n", | ||
748 | xfer->rx_buf ? 1 : 0, xfer->tx_buf ? 1 : 0, | 747 | xfer->rx_buf ? 1 : 0, xfer->tx_buf ? 1 : 0, |
749 | (sdd->state & RXBUSY) ? 'f' : 'p', | 748 | (sdd->state & RXBUSY) ? 'f' : 'p', |
750 | (sdd->state & TXBUSY) ? 'f' : 'p', | 749 | (sdd->state & TXBUSY) ? 'f' : 'p', |
@@ -799,7 +798,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi) | |||
799 | 798 | ||
800 | /* Acquire DMA channels */ | 799 | /* Acquire DMA channels */ |
801 | while (!acquire_dma(sdd)) | 800 | while (!acquire_dma(sdd)) |
802 | msleep(10); | 801 | usleep_range(10000, 11000); |
803 | 802 | ||
804 | pm_runtime_get_sync(&sdd->pdev->dev); | 803 | pm_runtime_get_sync(&sdd->pdev->dev); |
805 | 804 | ||
@@ -841,16 +840,14 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata( | |||
841 | 840 | ||
842 | cs = kzalloc(sizeof(*cs), GFP_KERNEL); | 841 | cs = kzalloc(sizeof(*cs), GFP_KERNEL); |
843 | if (!cs) { | 842 | if (!cs) { |
844 | dev_err(&spi->dev, "could not allocate memory for controller" | 843 | dev_err(&spi->dev, "could not allocate memory for controller data\n"); |
845 | " data\n"); | ||
846 | of_node_put(data_np); | 844 | of_node_put(data_np); |
847 | return ERR_PTR(-ENOMEM); | 845 | return ERR_PTR(-ENOMEM); |
848 | } | 846 | } |
849 | 847 | ||
850 | cs->line = of_get_named_gpio(data_np, "cs-gpio", 0); | 848 | cs->line = of_get_named_gpio(data_np, "cs-gpio", 0); |
851 | if (!gpio_is_valid(cs->line)) { | 849 | if (!gpio_is_valid(cs->line)) { |
852 | dev_err(&spi->dev, "chip select gpio is not specified or " | 850 | dev_err(&spi->dev, "chip select gpio is not specified or invalid\n"); |
853 | "invalid\n"); | ||
854 | kfree(cs); | 851 | kfree(cs); |
855 | of_node_put(data_np); | 852 | of_node_put(data_np); |
856 | return ERR_PTR(-EINVAL); | 853 | return ERR_PTR(-EINVAL); |
@@ -1078,8 +1075,8 @@ static int s3c64xx_spi_get_dmares( | |||
1078 | if (!sdd->pdev->dev.of_node) { | 1075 | if (!sdd->pdev->dev.of_node) { |
1079 | res = platform_get_resource(pdev, IORESOURCE_DMA, tx ? 0 : 1); | 1076 | res = platform_get_resource(pdev, IORESOURCE_DMA, tx ? 0 : 1); |
1080 | if (!res) { | 1077 | if (!res) { |
1081 | dev_err(&pdev->dev, "Unable to get SPI-%s dma " | 1078 | dev_err(&pdev->dev, "Unable to get SPI-%s dma resource\n", |
1082 | "resource\n", chan_str); | 1079 | chan_str); |
1083 | return -ENXIO; | 1080 | return -ENXIO; |
1084 | } | 1081 | } |
1085 | dma_data->dmach = res->start; | 1082 | dma_data->dmach = res->start; |
@@ -1135,8 +1132,7 @@ static void s3c64xx_spi_dt_gpio_free(struct s3c64xx_spi_driver_data *sdd) | |||
1135 | gpio_free(sdd->gpios[idx]); | 1132 | gpio_free(sdd->gpios[idx]); |
1136 | } | 1133 | } |
1137 | 1134 | ||
1138 | static struct s3c64xx_spi_info * s3c64xx_spi_parse_dt( | 1135 | static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) |
1139 | struct device *dev) | ||
1140 | { | 1136 | { |
1141 | struct s3c64xx_spi_info *sci; | 1137 | struct s3c64xx_spi_info *sci; |
1142 | u32 temp; | 1138 | u32 temp; |
@@ -1148,16 +1144,14 @@ static struct s3c64xx_spi_info * s3c64xx_spi_parse_dt( | |||
1148 | } | 1144 | } |
1149 | 1145 | ||
1150 | if (of_property_read_u32(dev->of_node, "samsung,spi-src-clk", &temp)) { | 1146 | if (of_property_read_u32(dev->of_node, "samsung,spi-src-clk", &temp)) { |
1151 | dev_warn(dev, "spi bus clock parent not specified, using " | 1147 | dev_warn(dev, "spi bus clock parent not specified, using clock at index 0 as parent\n"); |
1152 | "clock at index 0 as parent\n"); | ||
1153 | sci->src_clk_nr = 0; | 1148 | sci->src_clk_nr = 0; |
1154 | } else { | 1149 | } else { |
1155 | sci->src_clk_nr = temp; | 1150 | sci->src_clk_nr = temp; |
1156 | } | 1151 | } |
1157 | 1152 | ||
1158 | if (of_property_read_u32(dev->of_node, "num-cs", &temp)) { | 1153 | if (of_property_read_u32(dev->of_node, "num-cs", &temp)) { |
1159 | dev_warn(dev, "number of chip select lines not specified, " | 1154 | dev_warn(dev, "number of chip select lines not specified, assuming 1 chip select line\n"); |
1160 | "assuming 1 chip select line\n"); | ||
1161 | sci->num_cs = 1; | 1155 | sci->num_cs = 1; |
1162 | } else { | 1156 | } else { |
1163 | sci->num_cs = temp; | 1157 | sci->num_cs = temp; |
@@ -1247,8 +1241,8 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev) | |||
1247 | if (pdev->dev.of_node) { | 1241 | if (pdev->dev.of_node) { |
1248 | ret = of_alias_get_id(pdev->dev.of_node, "spi"); | 1242 | ret = of_alias_get_id(pdev->dev.of_node, "spi"); |
1249 | if (ret < 0) { | 1243 | if (ret < 0) { |
1250 | dev_err(&pdev->dev, "failed to get alias id, " | 1244 | dev_err(&pdev->dev, "failed to get alias id, errno %d\n", |
1251 | "errno %d\n", ret); | 1245 | ret); |
1252 | goto err0; | 1246 | goto err0; |
1253 | } | 1247 | } |
1254 | sdd->port_id = ret; | 1248 | sdd->port_id = ret; |
@@ -1348,8 +1342,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev) | |||
1348 | goto err3; | 1342 | goto err3; |
1349 | } | 1343 | } |
1350 | 1344 | ||
1351 | dev_dbg(&pdev->dev, "Samsung SoC SPI Driver loaded for Bus SPI-%d " | 1345 | dev_dbg(&pdev->dev, "Samsung SoC SPI Driver loaded for Bus SPI-%d with %d Slaves attached\n", |
1352 | "with %d Slaves attached\n", | ||
1353 | sdd->port_id, master->num_chipselect); | 1346 | sdd->port_id, master->num_chipselect); |
1354 | dev_dbg(&pdev->dev, "\tIOmem=[0x%x-0x%x]\tDMA=[Rx-%d, Tx-%d]\n", | 1347 | dev_dbg(&pdev->dev, "\tIOmem=[0x%x-0x%x]\tDMA=[Rx-%d, Tx-%d]\n", |
1355 | mem_res->end, mem_res->start, | 1348 | mem_res->end, mem_res->start, |