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>
This commit is contained in:
parent
4eb770067f
commit
75bf336110
|
@ -62,7 +62,7 @@
|
||||||
#define S3C64XX_SPI_CLKSEL_SRCMSK (3<<9)
|
#define S3C64XX_SPI_CLKSEL_SRCMSK (3<<9)
|
||||||
#define S3C64XX_SPI_CLKSEL_SRCSHFT 9
|
#define S3C64XX_SPI_CLKSEL_SRCSHFT 9
|
||||||
#define S3C64XX_SPI_ENCLK_ENABLE (1<<8)
|
#define S3C64XX_SPI_ENCLK_ENABLE (1<<8)
|
||||||
#define S3C64XX_SPI_PSR_MASK 0xff
|
#define S3C64XX_SPI_PSR_MASK 0xff
|
||||||
|
|
||||||
#define S3C64XX_SPI_MODE_CH_TSZ_BYTE (0<<29)
|
#define S3C64XX_SPI_MODE_CH_TSZ_BYTE (0<<29)
|
||||||
#define S3C64XX_SPI_MODE_CH_TSZ_HALFWORD (1<<29)
|
#define S3C64XX_SPI_MODE_CH_TSZ_HALFWORD (1<<29)
|
||||||
|
@ -743,8 +743,7 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
|
||||||
sdd->regs + S3C64XX_SPI_SLAVE_SEL);
|
sdd->regs + S3C64XX_SPI_SLAVE_SEL);
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
dev_err(&spi->dev, "I/O Error: "
|
dev_err(&spi->dev, "I/O Error: rx-%d tx-%d res:rx-%c tx-%c len-%d\n",
|
||||||
"rx-%d tx-%d res:rx-%c tx-%c len-%d\n",
|
|
||||||
xfer->rx_buf ? 1 : 0, xfer->tx_buf ? 1 : 0,
|
xfer->rx_buf ? 1 : 0, xfer->tx_buf ? 1 : 0,
|
||||||
(sdd->state & RXBUSY) ? 'f' : 'p',
|
(sdd->state & RXBUSY) ? 'f' : 'p',
|
||||||
(sdd->state & TXBUSY) ? 'f' : 'p',
|
(sdd->state & TXBUSY) ? 'f' : 'p',
|
||||||
|
@ -799,7 +798,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
|
||||||
|
|
||||||
/* Acquire DMA channels */
|
/* Acquire DMA channels */
|
||||||
while (!acquire_dma(sdd))
|
while (!acquire_dma(sdd))
|
||||||
msleep(10);
|
usleep_range(10000, 11000);
|
||||||
|
|
||||||
pm_runtime_get_sync(&sdd->pdev->dev);
|
pm_runtime_get_sync(&sdd->pdev->dev);
|
||||||
|
|
||||||
|
@ -841,16 +840,14 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
|
||||||
|
|
||||||
cs = kzalloc(sizeof(*cs), GFP_KERNEL);
|
cs = kzalloc(sizeof(*cs), GFP_KERNEL);
|
||||||
if (!cs) {
|
if (!cs) {
|
||||||
dev_err(&spi->dev, "could not allocate memory for controller"
|
dev_err(&spi->dev, "could not allocate memory for controller data\n");
|
||||||
" data\n");
|
|
||||||
of_node_put(data_np);
|
of_node_put(data_np);
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
cs->line = of_get_named_gpio(data_np, "cs-gpio", 0);
|
cs->line = of_get_named_gpio(data_np, "cs-gpio", 0);
|
||||||
if (!gpio_is_valid(cs->line)) {
|
if (!gpio_is_valid(cs->line)) {
|
||||||
dev_err(&spi->dev, "chip select gpio is not specified or "
|
dev_err(&spi->dev, "chip select gpio is not specified or invalid\n");
|
||||||
"invalid\n");
|
|
||||||
kfree(cs);
|
kfree(cs);
|
||||||
of_node_put(data_np);
|
of_node_put(data_np);
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
|
@ -1078,8 +1075,8 @@ static int s3c64xx_spi_get_dmares(
|
||||||
if (!sdd->pdev->dev.of_node) {
|
if (!sdd->pdev->dev.of_node) {
|
||||||
res = platform_get_resource(pdev, IORESOURCE_DMA, tx ? 0 : 1);
|
res = platform_get_resource(pdev, IORESOURCE_DMA, tx ? 0 : 1);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
dev_err(&pdev->dev, "Unable to get SPI-%s dma "
|
dev_err(&pdev->dev, "Unable to get SPI-%s dma resource\n",
|
||||||
"resource\n", chan_str);
|
chan_str);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
dma_data->dmach = res->start;
|
dma_data->dmach = res->start;
|
||||||
|
@ -1135,8 +1132,7 @@ static void s3c64xx_spi_dt_gpio_free(struct s3c64xx_spi_driver_data *sdd)
|
||||||
gpio_free(sdd->gpios[idx]);
|
gpio_free(sdd->gpios[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct s3c64xx_spi_info * s3c64xx_spi_parse_dt(
|
static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev)
|
||||||
struct device *dev)
|
|
||||||
{
|
{
|
||||||
struct s3c64xx_spi_info *sci;
|
struct s3c64xx_spi_info *sci;
|
||||||
u32 temp;
|
u32 temp;
|
||||||
|
@ -1148,16 +1144,14 @@ static struct s3c64xx_spi_info * s3c64xx_spi_parse_dt(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (of_property_read_u32(dev->of_node, "samsung,spi-src-clk", &temp)) {
|
if (of_property_read_u32(dev->of_node, "samsung,spi-src-clk", &temp)) {
|
||||||
dev_warn(dev, "spi bus clock parent not specified, using "
|
dev_warn(dev, "spi bus clock parent not specified, using clock at index 0 as parent\n");
|
||||||
"clock at index 0 as parent\n");
|
|
||||||
sci->src_clk_nr = 0;
|
sci->src_clk_nr = 0;
|
||||||
} else {
|
} else {
|
||||||
sci->src_clk_nr = temp;
|
sci->src_clk_nr = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (of_property_read_u32(dev->of_node, "num-cs", &temp)) {
|
if (of_property_read_u32(dev->of_node, "num-cs", &temp)) {
|
||||||
dev_warn(dev, "number of chip select lines not specified, "
|
dev_warn(dev, "number of chip select lines not specified, assuming 1 chip select line\n");
|
||||||
"assuming 1 chip select line\n");
|
|
||||||
sci->num_cs = 1;
|
sci->num_cs = 1;
|
||||||
} else {
|
} else {
|
||||||
sci->num_cs = temp;
|
sci->num_cs = temp;
|
||||||
|
@ -1247,8 +1241,8 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
|
||||||
if (pdev->dev.of_node) {
|
if (pdev->dev.of_node) {
|
||||||
ret = of_alias_get_id(pdev->dev.of_node, "spi");
|
ret = of_alias_get_id(pdev->dev.of_node, "spi");
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(&pdev->dev, "failed to get alias id, "
|
dev_err(&pdev->dev, "failed to get alias id, errno %d\n",
|
||||||
"errno %d\n", ret);
|
ret);
|
||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
sdd->port_id = ret;
|
sdd->port_id = ret;
|
||||||
|
@ -1348,8 +1342,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
|
||||||
goto err3;
|
goto err3;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(&pdev->dev, "Samsung SoC SPI Driver loaded for Bus SPI-%d "
|
dev_dbg(&pdev->dev, "Samsung SoC SPI Driver loaded for Bus SPI-%d with %d Slaves attached\n",
|
||||||
"with %d Slaves attached\n",
|
|
||||||
sdd->port_id, master->num_chipselect);
|
sdd->port_id, master->num_chipselect);
|
||||||
dev_dbg(&pdev->dev, "\tIOmem=[0x%x-0x%x]\tDMA=[Rx-%d, Tx-%d]\n",
|
dev_dbg(&pdev->dev, "\tIOmem=[0x%x-0x%x]\tDMA=[Rx-%d, Tx-%d]\n",
|
||||||
mem_res->end, mem_res->start,
|
mem_res->end, mem_res->start,
|
||||||
|
|
Loading…
Reference in New Issue