OSDN Git Service

staging: imx-drm: use true and false for bool variables
authorValentina Manea <valentina.manea.m@gmail.com>
Fri, 25 Oct 2013 08:52:20 +0000 (11:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2013 21:26:45 +0000 (14:26 -0700)
This patch fixes coccinelle errors for bool variables
initialized with 1 or 0 instead of true and false.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/imx-tve.c
drivers/staging/imx-drm/ipu-v3/ipu-common.c
drivers/staging/imx-drm/ipu-v3/ipu-dc.c
drivers/staging/imx-drm/ipu-v3/ipu-dp.c

index 59dd4d5..680f4c8 100644 (file)
@@ -151,7 +151,7 @@ static void tve_enable(struct imx_tve *tve)
 
        spin_lock_irqsave(&tve->enable_lock, flags);
        if (!tve->enabled) {
-               tve->enabled = 1;
+               tve->enabled = true;
                clk_prepare_enable(tve->clk);
                ret = regmap_update_bits(tve->regmap, TVE_COM_CONF_REG,
                                         TVE_IPU_CLK_EN | TVE_EN,
@@ -180,7 +180,7 @@ static void tve_disable(struct imx_tve *tve)
 
        spin_lock_irqsave(&tve->enable_lock, flags);
        if (tve->enabled) {
-               tve->enabled = 0;
+               tve->enabled = false;
                ret = regmap_update_bits(tve->regmap, TVE_COM_CONF_REG,
                                         TVE_IPU_CLK_EN | TVE_EN, 0);
                clk_disable_unprepare(tve->clk);
index a0e7fc2..77a0c65 100644 (file)
@@ -564,7 +564,7 @@ struct ipuv3_channel *ipu_idmac_get(struct ipu_soc *ipu, unsigned num)
                goto out;
        }
 
-       channel->busy = 1;
+       channel->busy = true;
        channel->num = num;
 
 out:
@@ -582,7 +582,7 @@ void ipu_idmac_put(struct ipuv3_channel *channel)
 
        mutex_lock(&ipu->channel_lock);
 
-       channel->busy = 0;
+       channel->busy = false;
 
        mutex_unlock(&ipu->channel_lock);
 }
index 1a6e06d..d0e3bc3 100644 (file)
@@ -316,7 +316,7 @@ struct ipu_dc *ipu_dc_get(struct ipu_soc *ipu, int channel)
                return ERR_PTR(-EBUSY);
        }
 
-       dc->in_use = 1;
+       dc->in_use = true;
 
        mutex_unlock(&priv->mutex);
 
@@ -329,7 +329,7 @@ void ipu_dc_put(struct ipu_dc *dc)
        struct ipu_dc_priv *priv = dc->priv;
 
        mutex_lock(&priv->mutex);
-       dc->in_use = 0;
+       dc->in_use = false;
        mutex_unlock(&priv->mutex);
 }
 EXPORT_SYMBOL_GPL(ipu_dc_put);
index 231afd6..58f87c8 100644 (file)
@@ -325,7 +325,7 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)
        mutex_init(&priv->mutex);
 
        for (i = 0; i < IPUV3_NUM_FLOWS; i++) {
-               priv->flow[i].foreground.foreground = 1;
+               priv->flow[i].foreground.foreground = true;
                priv->flow[i].base = priv->base + ipu_dp_flow_base[i];
                priv->flow[i].priv = priv;
        }