Skip to content

Commit

Permalink
spi: spi-mxs: Fix checkpatch issue
Browse files Browse the repository at this point in the history
Fix the following checkpatch warnings.

  WARNING: Missing a blank line after declarations
  WARNING: Prefer kcalloc over kzalloc with multiply

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jingoo Han authored and Mark Brown committed Sep 2, 2014
1 parent cdc67fa commit a7fa321
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/spi/spi-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,14 @@ static int mxs_ssp_wait(struct mxs_spi *spi, int offset, int mask, bool set)
static void mxs_ssp_dma_irq_callback(void *param)
{
struct mxs_spi *spi = param;

complete(&spi->c);
}

static irqreturn_t mxs_ssp_irq_handler(int irq, void *dev_id)
{
struct mxs_ssp *ssp = dev_id;

dev_err(ssp->dev, "%s[%i] CTRL1=%08x STATUS=%08x\n",
__func__, __LINE__,
readl(ssp->base + HW_SSP_CTRL1(ssp)),
Expand Down Expand Up @@ -189,7 +191,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi,
if (!len)
return -EINVAL;

dma_xfer = kzalloc(sizeof(*dma_xfer) * sgs, GFP_KERNEL);
dma_xfer = kcalloc(sgs, sizeof(*dma_xfer), GFP_KERNEL);
if (!dma_xfer)
return -ENOMEM;

Expand Down

0 comments on commit a7fa321

Please sign in to comment.