Skip to contentSkip to conversation

iMX Coding Style Patch

PATCH Rene Kolarik 2 participants 2 messages Sep 18, 2014 – Sep 19, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hello,

I'm sending this as a part of Eudyptula Challenge.

Rene Kolarik

Documentation/devicetree/bindings/arm/fsl.txt +4 -0
index e935d7d..4004bb8 100644
@@ -71,6 +71,10 @@ i.MX53 generic board
 Required root node properties:
     - compatible = "fsl,imx53";
 
+i.MX53 Television Encoder
+Required root node properties:
+    - compatible = "fsl,imx53-tve";
+
 i.MX6q generic board
 Required root node properties:
     - compatible = "fsl,imx6q";
drivers/staging/imx-drm/imx-drm-core.c +2 -1
index e9fba97..a04b3ef 100644
@@ -630,7 +630,8 @@ static int imx_drm_platform_probe(struct platform_device *pdev)
 				continue;
 			}
 
-			component_match_add(&pdev->dev, &match, compare_of, remote);
+			component_match_add(&pdev->dev, &match, compare_of,
+				remote);
 			of_node_put(remote);
 		}
 		of_node_put(port);
drivers/staging/imx-drm/imx-hdmi.c +1 -2
index 18c9ccd..aaec6b2 100644
@@ -323,8 +323,7 @@ static unsigned int hdmi_compute_cts(unsigned int freq, unsigned long pixel_clk,
 	}
 	if (ratio == 100)
 		return cts;
-	else
-		return (cts * ratio) / 100;
+	return (cts * ratio) / 100;
 }
 
 static void hdmi_set_clk_regenerator(struct imx_hdmi *hdmi,
drivers/staging/imx-drm/imx-tve.c +5 -5
index 31fe7cf..a12202a 100644
@@ -430,10 +430,9 @@ static long clk_tve_di_round_rate(struct clk_hw *hw, unsigned long rate,
 	div = *prate / rate;
 	if (div >= 4)
 		return *prate / 4;
-	else if (div >= 2)
+	if (div >= 2)
 		return *prate / 2;
-	else
-		return *prate;
+	return *prate;
 }
 
 static int clk_tve_di_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -538,7 +537,7 @@ static struct regmap_config tve_regmap_config = {
 	.max_register = 0xdc,
 };
 
-static const char *imx_tve_modes[] = {
+static const char * const imx_tve_modes[] = {
 	[TVE_MODE_TVOUT]  = "tvout",
 	[TVE_MODE_VGA] = "vga",
 };
@@ -666,7 +665,8 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)
 
 	ret = regmap_read(tve->regmap, TVE_COM_CONF_REG, &val);
 	if (ret < 0) {
-		dev_err(dev, "failed to read configuration register: %d\n", ret);
+		dev_err(dev, "failed to read configuration register: %d\n",
+			ret);
 		return ret;
 	}
 	if (val != 0x00100000) {
drivers/staging/imx-drm/parallel-display.c +2 -1
index 1998846..601439b 100644
@@ -228,7 +228,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
 		else if (!strcmp(fmt, "bgr666"))
 			imxpd->interface_pix_fmt = V4L2_PIX_FMT_BGR666;
 		else if (!strcmp(fmt, "lvds666"))
-			imxpd->interface_pix_fmt = v4l2_fourcc('L', 'V', 'D', '6');
+			imxpd->interface_pix_fmt = v4l2_fourcc(
+				'L', 'V', 'D', '6');
 	}
 
 	panel_node = of_parse_phandle(np, "fsl,panel", 0);

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

#1 lore raw
Quoted 5 lines · Rene Kolarik

Hello,

I'm sending this as a part of Eudyptula Challenge.

Rene Kolarik

Send it inline.
Read the first paragraph of Documentation/email-clients.txt. Choose a better subject.
Add a patch description.
Split it into one type of change per patch.
Add a signed-off-by line.

regards,
dan carpenter