All of lore.kernel.org
 help / color / mirror / Atom feed
From: Piotr Chmura <chmooreck@poczta.onet.pl>
To: Sylwester Nawrocki <snjw23@gmail.com>,
	Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>,
	Stefan Richter <stefanr@s5r6.in-berlin.de>,
	Greg KH <gregkh@suse.de>, Patrick Dickey <pdickeybeta@gmail.com>,
	LMML <linux-media@vger.kernel.org>,
	devel@driverdev.osuosl.org
Subject: [PATCH v3 4/14] staging/media/as102: checkpatch fixes
Date: Sun, 30 Oct 2011 08:11:56 +0100	[thread overview]
Message-ID: <20111030081156.14b70914@darkstar> (raw)
In-Reply-To: <4EAC7214.5030008@gmail.com>

Patch taken from http://kernellabs.com/hg/~dheitmueller/v4l-dvb-as102-2/

Original source and comment:
# HG changeset patch
# User Devin Heitmueller <dheitmueller@kernellabs.com>
# Date 1267318701 18000
# Node ID 69c8f5172790784738bcc18f8301919ef3d5373f
# Parent  b91e96a07bee27c1d421b4c3702e33ee8075de83
as102: checkpatch fixes

From: Devin Heitmueller <dheitmueller@kernellabs.com>

Fix make checkpatch issues reported against as10x_cmd.c.

Priority: normal

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
----
Added missing empty lines at end of patch

Sylwester could you check if it applies cleanly now ?


diff --git linux/drivers/staging/media/as102/as10x_cmd.c linuxb/drivers/staging/media/as102/as10x_cmd.c
--- linux/drivers/staging/media/as102/as10x_cmd.c
+++ linuxb/drivers/staging/media/as102/as10x_cmd.c
@@ -1,6 +1,7 @@
 /*
  * Abilis Systems Single DVB-T Receiver
  * Copyright (C) 2008 Pierrick Hascoet <pierrick.hascoet@abilis.com>
+ * Copyright (C) 2010 Devin Heitmueller <dheitmueller@kernellabs.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,7 +22,8 @@
 #include <linux/kernel.h>
 #include "as102_drv.h"
 #elif defined(WIN32)
-   #if defined(__BUILDMACHINE__) && (__BUILDMACHINE__ == WinDDK)  /* win32 ddk implementation */
+   #if defined(__BUILDMACHINE__) && (__BUILDMACHINE__ == WinDDK)
+      /* win32 ddk implementation */
       #include "wdm.h"
       #include "Device.h"
       #include "endian_mgmt.h" /* FIXME */
@@ -51,43 +53,42 @@
 */
 int as10x_cmd_turn_on(as10x_handle_t *phandle)
 {
-   int error;
-   struct as10x_cmd_t *pcmd, *prsp;
+	int error;
+	struct as10x_cmd_t *pcmd, *prsp;
 
-   ENTER();
+	ENTER();
 
-   pcmd = phandle->cmd;
-   prsp = phandle->rsp;
+	pcmd = phandle->cmd;
+	prsp = phandle->rsp;
 
-   /* prepare command */
-   as10x_cmd_build(pcmd,(++phandle->cmd_xid), sizeof(pcmd->body.turn_on.req));
+	/* prepare command */
+	as10x_cmd_build(pcmd, (++phandle->cmd_xid),
+			sizeof(pcmd->body.turn_on.req));
 
-   /* fill command */
-   pcmd->body.turn_on.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNON);
+	/* fill command */
+	pcmd->body.turn_on.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNON);
 
-   /* send command */
-   if(phandle->ops->xfer_cmd) {
-      error = phandle->ops->xfer_cmd(
-			phandle,
-			(uint8_t *) pcmd,
-			sizeof(pcmd->body.turn_on.req) + HEADER_SIZE,
-			(uint8_t *) prsp,
-			sizeof(prsp->body.turn_on.rsp) + HEADER_SIZE);
-   }
-   else{
-      error = AS10X_CMD_ERROR;
-   }
+	/* send command */
+	if (phandle->ops->xfer_cmd) {
+		error = phandle->ops->xfer_cmd(phandle, (uint8_t *) pcmd,
+					       sizeof(pcmd->body.turn_on.req) +
+					       HEADER_SIZE,
+					       (uint8_t *) prsp,
+					       sizeof(prsp->body.turn_on.rsp) +
+					       HEADER_SIZE);
+	} else {
+		error = AS10X_CMD_ERROR;
+	}
 
-   if(error < 0) {
-      goto out;
-   }
+	if (error < 0)
+		goto out;
 
-   /* parse response */
-   error = as10x_rsp_parse(prsp, CONTROL_PROC_TURNON_RSP);
+	/* parse response */
+	error = as10x_rsp_parse(prsp, CONTROL_PROC_TURNON_RSP);
 
 out:
-   LEAVE();
-   return(error);
+	LEAVE();
+	return error;
 }
 
 /**
@@ -98,42 +99,41 @@
 */
 int as10x_cmd_turn_off(as10x_handle_t *phandle)
 {
-   int error;
-   struct as10x_cmd_t *pcmd, *prsp;
+	int error;
+	struct as10x_cmd_t *pcmd, *prsp;
 
-   ENTER();
+	ENTER();
 
-   pcmd = phandle->cmd;
-   prsp = phandle->rsp;
+	pcmd = phandle->cmd;
+	prsp = phandle->rsp;
 
-   /* prepare command */
-   as10x_cmd_build(pcmd,(++phandle->cmd_xid),sizeof(pcmd->body.turn_off.req));
+	/* prepare command */
+	as10x_cmd_build(pcmd, (++phandle->cmd_xid),
+			sizeof(pcmd->body.turn_off.req));
 
-   /* fill command */
-   pcmd->body.turn_off.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNOFF);
+	/* fill command */
+	pcmd->body.turn_off.req.proc_id = cpu_to_le16(CONTROL_PROC_TURNOFF);
 
-   /* send command */
-   if(phandle->ops->xfer_cmd) {
-      error = phandle->ops->xfer_cmd(
+	/* send command */
+	if (phandle->ops->xfer_cmd) {
+		error = phandle->ops->xfer_cmd(
 			phandle, (uint8_t *) pcmd,
 			sizeof(pcmd->body.turn_off.req) + HEADER_SIZE,
-			 (uint8_t *) prsp,
+			(uint8_t *) prsp,
 			sizeof(prsp->body.turn_off.rsp) + HEADER_SIZE);
-   }
-   else{
-      error = AS10X_CMD_ERROR;
-   }
+	} else {
+		error = AS10X_CMD_ERROR;
+	}
 
-   if(error < 0) {
-      goto out;
-   }
+	if (error < 0)
+		goto out;
 
-   /* parse response */
-   error = as10x_rsp_parse(prsp, CONTROL_PROC_TURNOFF_RSP);
+	/* parse response */
+	error = as10x_rsp_parse(prsp, CONTROL_PROC_TURNOFF_RSP);
 
 out:
-   LEAVE();
-   return(error);
+	LEAVE();
+	return error;
 }
 
 /**
@@ -145,50 +145,54 @@
  */
 int as10x_cmd_set_tune(as10x_handle_t *phandle, struct as10x_tune_args *ptune)
 {
-   int error;
-   struct as10x_cmd_t *preq, *prsp;
+	int error;
+	struct as10x_cmd_t *preq, *prsp;
 
-   ENTER();
+	ENTER();
 
-   preq = phandle->cmd;
-   prsp = phandle->rsp;
+	preq = phandle->cmd;
+	prsp = phandle->rsp;
 
-   /* prepare command */
-   as10x_cmd_build(preq,(++phandle->cmd_xid),sizeof(preq->body.set_tune.req));
+	/* prepare command */
+	as10x_cmd_build(preq, (++phandle->cmd_xid),
+			sizeof(preq->body.set_tune.req));
 
-   /* fill command */
-   preq->body.set_tune.req.proc_id                 = cpu_to_le16(CONTROL_PROC_SETTUNE);
-   preq->body.set_tune.req.args.freq               = cpu_to_le32(ptune->freq);
-   preq->body.set_tune.req.args.bandwidth          = ptune->bandwidth;
-   preq->body.set_tune.req.args.hier_select        = ptune->hier_select;
-   preq->body.set_tune.req.args.constellation      = ptune->constellation;
-   preq->body.set_tune.req.args.hierarchy          = ptune->hierarchy;
-   preq->body.set_tune.req.args.interleaving_mode  = ptune->interleaving_mode;
-   preq->body.set_tune.req.args.code_rate          = ptune->code_rate;
-   preq->body.set_tune.req.args.guard_interval     = ptune->guard_interval;
-   preq->body.set_tune.req.args.transmission_mode  = ptune->transmission_mode;
+	/* fill command */
+	preq->body.set_tune.req.proc_id = cpu_to_le16(CONTROL_PROC_SETTUNE);
+	preq->body.set_tune.req.args.freq = cpu_to_le32(ptune->freq);
+	preq->body.set_tune.req.args.bandwidth = ptune->bandwidth;
+	preq->body.set_tune.req.args.hier_select = ptune->hier_select;
+	preq->body.set_tune.req.args.constellation = ptune->constellation;
+	preq->body.set_tune.req.args.hierarchy = ptune->hierarchy;
+	preq->body.set_tune.req.args.interleaving_mode  =
+		ptune->interleaving_mode;
+	preq->body.set_tune.req.args.code_rate  = ptune->code_rate;
+	preq->body.set_tune.req.args.guard_interval = ptune->guard_interval;
+	preq->body.set_tune.req.args.transmission_mode  =
+		ptune->transmission_mode;
 
-   /* send command */
-   if(phandle->ops->xfer_cmd) {
-      error = phandle->ops->xfer_cmd(phandle,
-			(uint8_t *) preq,
-			sizeof(preq->body.set_tune.req) + HEADER_SIZE,
-			(uint8_t *) prsp,
-			sizeof(prsp->body.set_tune.rsp) + HEADER_SIZE);
-   } else{
-      error = AS10X_CMD_ERROR;
-   }
+	/* send command */
+	if (phandle->ops->xfer_cmd) {
+		error = phandle->ops->xfer_cmd(phandle,
+					       (uint8_t *) preq,
+					       sizeof(preq->body.set_tune.req)
+					       + HEADER_SIZE,
+					       (uint8_t *) prsp,
+					       sizeof(prsp->body.set_tune.rsp)
+					       + HEADER_SIZE);
+	} else {
+		error = AS10X_CMD_ERROR;
+	}
 
-   if(error < 0) {
-      goto out;
-   }
+	if (error < 0)
+		goto out;
 
-   /* parse response */
-   error = as10x_rsp_parse(prsp, CONTROL_PROC_SETTUNE_RSP);
+	/* parse response */
+	error = as10x_rsp_parse(prsp, CONTROL_PROC_SETTUNE_RSP);
 
 out:
-   LEAVE();
-   return(error);
+	LEAVE();
+	return error;
 }
 
 /**
@@ -198,57 +202,55 @@
    \return 0 when no error, < 0 in case of error.
    \callgraph
  */
-int as10x_cmd_get_tune_status(as10x_handle_t *phandle, struct as10x_tune_status *pstatus)
+int as10x_cmd_get_tune_status(as10x_handle_t *phandle,
+			      struct as10x_tune_status *pstatus)
 {
-   int error;
-   struct as10x_cmd_t  *preq, *prsp;
+	int error;
+	struct as10x_cmd_t  *preq, *prsp;
 
-   ENTER();
+	ENTER();
 
-   preq = phandle->cmd;
-   prsp = phandle->rsp;
+	preq = phandle->cmd;
+	prsp = phandle->rsp;
 
-   /* prepare command */
-   as10x_cmd_build(preq,(++phandle->cmd_xid),
-		   sizeof(preq->body.get_tune_status.req));
+	/* prepare command */
+	as10x_cmd_build(preq, (++phandle->cmd_xid),
+			sizeof(preq->body.get_tune_status.req));
 
-   /* fill command */
-   preq->body.get_tune_status.req.proc_id =
-			cpu_to_le16(CONTROL_PROC_GETTUNESTAT);
+	/* fill command */
+	preq->body.get_tune_status.req.proc_id =
+		cpu_to_le16(CONTROL_PROC_GETTUNESTAT);
 
-   /* send command */
-   if (phandle->ops->xfer_cmd) {
-      error = phandle->ops->xfer_cmd(
+	/* send command */
+	if (phandle->ops->xfer_cmd) {
+		error = phandle->ops->xfer_cmd(
 			phandle,
 			(uint8_t *) preq,
 			sizeof(preq->body.get_tune_status.req) + HEADER_SIZE,
 			(uint8_t *) prsp,
 			sizeof(prsp->body.get_tune_status.rsp) + HEADER_SIZE);
-   }
-   else{
-      error = AS10X_CMD_ERROR;
-   }
+	} else {
+		error = AS10X_CMD_ERROR;
+	}
 
-   if (error < 0) {
-      goto out;
-   }
+	if (error < 0)
+		goto out;
 
-   /* parse response */
-   error = as10x_rsp_parse(prsp, CONTROL_PROC_GETTUNESTAT_RSP);
-   if (error < 0) {
-      goto out;
-   }
+	/* parse response */
+	error = as10x_rsp_parse(prsp, CONTROL_PROC_GETTUNESTAT_RSP);
+	if (error < 0)
+		goto out;
 
-   /* Response OK -> get response data */
-   pstatus->tune_state       = prsp->body.get_tune_status.rsp.sts.tune_state;
-   pstatus->signal_strength  =
-		   le16_to_cpu(prsp->body.get_tune_status.rsp.sts.signal_strength);
-   pstatus->PER              = le16_to_cpu(prsp->body.get_tune_status.rsp.sts.PER);
-   pstatus->BER              = le16_to_cpu(prsp->body.get_tune_status.rsp.sts.BER);
+	/* Response OK -> get response data */
+	pstatus->tune_state = prsp->body.get_tune_status.rsp.sts.tune_state;
+	pstatus->signal_strength  =
+		le16_to_cpu(prsp->body.get_tune_status.rsp.sts.signal_strength);
+	pstatus->PER = le16_to_cpu(prsp->body.get_tune_status.rsp.sts.PER);
+	pstatus->BER = le16_to_cpu(prsp->body.get_tune_status.rsp.sts.BER);
 
 out:
-   LEAVE();
-   return(error);
+	LEAVE();
+	return error;
 }
 
 /**
@@ -260,56 +262,58 @@
  */
 int as10x_cmd_get_tps(as10x_handle_t *phandle, struct as10x_tps *ptps)
 {
+	int error;
+	struct as10x_cmd_t *pcmd, *prsp;
 
-   int error;
-   struct as10x_cmd_t *pcmd, *prsp;
+	ENTER();
 
-   ENTER();
+	pcmd = phandle->cmd;
+	prsp = phandle->rsp;
 
-   pcmd = phandle->cmd;
-   prsp = phandle->rsp;
+	/* prepare command */
+	as10x_cmd_build(pcmd, (++phandle->cmd_xid),
+			sizeof(pcmd->body.get_tps.req));
 
-   /* prepare command */
-   as10x_cmd_build(pcmd, (++phandle->cmd_xid),sizeof(pcmd->body.get_tps.req));
+	/* fill command */
+	pcmd->body.get_tune_status.req.proc_id =
+		cpu_to_le16(CONTROL_PROC_GETTPS);
 
-   /* fill command */
-   pcmd->body.get_tune_status.req.proc_id = cpu_to_le16(CONTROL_PROC_GETTPS);
+	/* send command */
+	if (phandle->ops->xfer_cmd) {
+		error = phandle->ops->xfer_cmd(phandle,
+					       (uint8_t *) pcmd,
+					       sizeof(pcmd->body.get_tps.req) +
+					       HEADER_SIZE,
+					       (uint8_t *) prsp,
+					       sizeof(prsp->body.get_tps.rsp) +
+					       HEADER_SIZE);
+	} else {
+		error = AS10X_CMD_ERROR;
+	}
 
-   /* send command */
-   if(phandle->ops->xfer_cmd) {
-      error = phandle->ops->xfer_cmd(phandle,
-	       (uint8_t *) pcmd, sizeof(pcmd->body.get_tps.req) + HEADER_SIZE,
-	       (uint8_t *) prsp, sizeof(prsp->body.get_tps.rsp) + HEADER_SIZE);
-   }
-   else{
-      error = AS10X_CMD_ERROR;
-   }
+	if (error < 0)
+		goto out;
 
-   if(error < 0) {
-      goto out;
-   }
+	/* parse response */
+	error = as10x_rsp_parse(prsp, CONTROL_PROC_GETTPS_RSP);
+	if (error < 0)
+		goto out;
 
-   /* parse response */
-   error = as10x_rsp_parse(prsp, CONTROL_PROC_GETTPS_RSP);
-   if (error < 0) {
-      goto out;
-   }
-
-   /* Response OK -> get response data */
-   ptps->constellation      = prsp->body.get_tps.rsp.tps.constellation;
-   ptps->hierarchy          = prsp->body.get_tps.rsp.tps.hierarchy;
-   ptps->interleaving_mode  = prsp->body.get_tps.rsp.tps.interleaving_mode;
-   ptps->code_rate_HP       = prsp->body.get_tps.rsp.tps.code_rate_HP;
-   ptps->code_rate_LP       = prsp->body.get_tps.rsp.tps.code_rate_LP;
-   ptps->guard_interval     = prsp->body.get_tps.rsp.tps.guard_interval;
-   ptps->transmission_mode  = prsp->body.get_tps.rsp.tps.transmission_mode;
-   ptps->DVBH_mask_HP       = prsp->body.get_tps.rsp.tps.DVBH_mask_HP;
-   ptps->DVBH_mask_LP       = prsp->body.get_tps.rsp.tps.DVBH_mask_LP;
-   ptps->cell_ID            = le16_to_cpu(prsp->body.get_tps.rsp.tps.cell_ID);
+	/* Response OK -> get response data */
+	ptps->constellation = prsp->body.get_tps.rsp.tps.constellation;
+	ptps->hierarchy = prsp->body.get_tps.rsp.tps.hierarchy;
+	ptps->interleaving_mode = prsp->body.get_tps.rsp.tps.interleaving_mode;
+	ptps->code_rate_HP = prsp->body.get_tps.rsp.tps.code_rate_HP;
+	ptps->code_rate_LP = prsp->body.get_tps.rsp.tps.code_rate_LP;
+	ptps->guard_interval = prsp->body.get_tps.rsp.tps.guard_interval;
+	ptps->transmission_mode  = prsp->body.get_tps.rsp.tps.transmission_mode;
+	ptps->DVBH_mask_HP = prsp->body.get_tps.rsp.tps.DVBH_mask_HP;
+	ptps->DVBH_mask_LP = prsp->body.get_tps.rsp.tps.DVBH_mask_LP;
+	ptps->cell_ID = le16_to_cpu(prsp->body.get_tps.rsp.tps.cell_ID);
 
 out:
-   LEAVE();
-   return(error);
+	LEAVE();
+	return error;
 }
 
 /**
@@ -322,59 +326,58 @@
 int as10x_cmd_get_demod_stats(as10x_handle_t  *phandle,
 			      struct as10x_demod_stats *pdemod_stats)
 {
-   int error;
-   struct as10x_cmd_t *pcmd, *prsp;
+	int error;
+	struct as10x_cmd_t *pcmd, *prsp;
 
-   ENTER();
+	ENTER();
 
-   pcmd = phandle->cmd;
-   prsp = phandle->rsp;
+	pcmd = phandle->cmd;
+	prsp = phandle->rsp;
 
-   /* prepare command */
-   as10x_cmd_build(pcmd, (++phandle->cmd_xid),
-		   sizeof(pcmd->body.get_demod_stats.req));
+	/* prepare command */
+	as10x_cmd_build(pcmd, (++phandle->cmd_xid),
+			sizeof(pcmd->body.get_demod_stats.req));
 
-   /* fill command */
-   pcmd->body.get_demod_stats.req.proc_id =
-      cpu_to_le16(CONTROL_PROC_GET_DEMOD_STATS);
+	/* fill command */
+	pcmd->body.get_demod_stats.req.proc_id =
+		cpu_to_le16(CONTROL_PROC_GET_DEMOD_STATS);
 
-   /* send command */
-   if(phandle->ops->xfer_cmd) {
-      error = phandle->ops->xfer_cmd(phandle,
-			 (uint8_t *) pcmd,
-			 sizeof(pcmd->body.get_demod_stats.req) + HEADER_SIZE,
-			 (uint8_t *) prsp,
-			 sizeof(prsp->body.get_demod_stats.rsp) + HEADER_SIZE);
-   }
-   else{
-      error = AS10X_CMD_ERROR;
-   }
+	/* send command */
+	if (phandle->ops->xfer_cmd) {
+		error = phandle->ops->xfer_cmd(phandle,
+				(uint8_t *) pcmd,
+				sizeof(pcmd->body.get_demod_stats.req)
+				+ HEADER_SIZE,
+				(uint8_t *) prsp,
+				sizeof(prsp->body.get_demod_stats.rsp)
+				+ HEADER_SIZE);
+	} else {
+		error = AS10X_CMD_ERROR;
+	}
 
-   if(error < 0) {
-      goto out;
-   }
+	if (error < 0)
+		goto out;
 
-   /* parse response */
-   error = as10x_rsp_parse(prsp,CONTROL_PROC_GET_DEMOD_STATS_RSP);
-   if (error < 0) {
-      goto out;
-   }
+	/* parse response */
+	error = as10x_rsp_parse(prsp, CONTROL_PROC_GET_DEMOD_STATS_RSP);
+	if (error < 0)
+		goto out;
 
-   /* Response OK -> get response data */
-   pdemod_stats->frame_count =
-	   le32_to_cpu(prsp->body.get_demod_stats.rsp.stats.frame_count);
-   pdemod_stats->bad_frame_count =
-	   le32_to_cpu(prsp->body.get_demod_stats.rsp.stats.bad_frame_count);
-   pdemod_stats->bytes_fixed_by_rs =
-	   le32_to_cpu(prsp->body.get_demod_stats.rsp.stats.bytes_fixed_by_rs);
-   pdemod_stats->mer =
-	   le16_to_cpu(prsp->body.get_demod_stats.rsp.stats.mer);
-   pdemod_stats->has_started =
-	   prsp->body.get_demod_stats.rsp.stats.has_started;
+	/* Response OK -> get response data */
+	pdemod_stats->frame_count =
+		le32_to_cpu(prsp->body.get_demod_stats.rsp.stats.frame_count);
+	pdemod_stats->bad_frame_count =
+		le32_to_cpu(prsp->body.get_demod_stats.rsp.stats.bad_frame_count);
+	pdemod_stats->bytes_fixed_by_rs =
+		le32_to_cpu(prsp->body.get_demod_stats.rsp.stats.bytes_fixed_by_rs);
+	pdemod_stats->mer =
+		le16_to_cpu(prsp->body.get_demod_stats.rsp.stats.mer);
+	pdemod_stats->has_started =
+		prsp->body.get_demod_stats.rsp.stats.has_started;
 
 out:
-   LEAVE();
-   return(error);
+	LEAVE();
+	return error;
 }
 
 /**
@@ -388,50 +391,49 @@
 int as10x_cmd_get_impulse_resp(as10x_handle_t     *phandle,
 			       uint8_t *is_ready)
 {
-   int error;
-   struct as10x_cmd_t *pcmd, *prsp;
+	int error;
+	struct as10x_cmd_t *pcmd, *prsp;
 
-   ENTER();
+	ENTER();
 
-   pcmd = phandle->cmd;
-   prsp = phandle->rsp;
+	pcmd = phandle->cmd;
+	prsp = phandle->rsp;
 
-   /* prepare command */
-   as10x_cmd_build(pcmd, (++phandle->cmd_xid),
-		   sizeof(pcmd->body.get_impulse_rsp.req));
+	/* prepare command */
+	as10x_cmd_build(pcmd, (++phandle->cmd_xid),
+			sizeof(pcmd->body.get_impulse_rsp.req));
 
-   /* fill command */
-   pcmd->body.get_impulse_rsp.req.proc_id =
-      cpu_to_le16(CONTROL_PROC_GET_IMPULSE_RESP);
+	/* fill command */
+	pcmd->body.get_impulse_rsp.req.proc_id =
+		cpu_to_le16(CONTROL_PROC_GET_IMPULSE_RESP);
 
-   /* send command */
-   if(phandle->ops->xfer_cmd) {
-      error = phandle->ops->xfer_cmd(phandle,
-			 (uint8_t *) pcmd,
-			 sizeof(pcmd->body.get_impulse_rsp.req) + HEADER_SIZE,
-			 (uint8_t *) prsp,
-			 sizeof(prsp->body.get_impulse_rsp.rsp) + HEADER_SIZE);
-   }
-   else{
-      error = AS10X_CMD_ERROR;
-   }
+	/* send command */
+	if (phandle->ops->xfer_cmd) {
+		error = phandle->ops->xfer_cmd(phandle,
+					(uint8_t *) pcmd,
+					sizeof(pcmd->body.get_impulse_rsp.req)
+					+ HEADER_SIZE,
+					(uint8_t *) prsp,
+					sizeof(prsp->body.get_impulse_rsp.rsp)
+					+ HEADER_SIZE);
+	} else {
+		error = AS10X_CMD_ERROR;
+	}
 
-   if(error < 0) {
-      goto out;
-   }
+	if (error < 0)
+		goto out;
 
-   /* parse response */
-   error = as10x_rsp_parse(prsp,CONTROL_PROC_GET_IMPULSE_RESP_RSP);
-   if (error < 0) {
-      goto out;
-   }
+	/* parse response */
+	error = as10x_rsp_parse(prsp, CONTROL_PROC_GET_IMPULSE_RESP_RSP);
+	if (error < 0)
+		goto out;
 
-   /* Response OK -> get response data */
-   *is_ready = prsp->body.get_impulse_rsp.rsp.is_ready;
+	/* Response OK -> get response data */
+	*is_ready = prsp->body.get_impulse_rsp.rsp.is_ready;
 
 out:
-   LEAVE();
-   return(error);
+	LEAVE();
+	return error;
 }
 
 
@@ -447,10 +449,10 @@
 void as10x_cmd_build(struct as10x_cmd_t *pcmd,
 		     uint16_t xid, uint16_t cmd_len)
 {
-   pcmd->header.req_id = cpu_to_le16(xid);
-   pcmd->header.prog = cpu_to_le16(SERVICE_PROG_ID);
-   pcmd->header.version = cpu_to_le16(SERVICE_PROG_VERSION);
-   pcmd->header.data_len = cpu_to_le16(cmd_len);
+	pcmd->header.req_id = cpu_to_le16(xid);
+	pcmd->header.prog = cpu_to_le16(SERVICE_PROG_ID);
+	pcmd->header.version = cpu_to_le16(SERVICE_PROG_VERSION);
+	pcmd->header.data_len = cpu_to_le16(cmd_len);
 }
 
 /**
@@ -463,16 +465,17 @@
 */
 int as10x_rsp_parse(struct as10x_cmd_t *prsp, uint16_t proc_id)
 {
-   int error;
+	int error;
 
-   /* extract command error code */
-   error = prsp->body.common.rsp.error;
+	/* extract command error code */
+	error = prsp->body.common.rsp.error;
 
-   if((error == 0) && (le16_to_cpu(prsp->body.common.rsp.proc_id) == proc_id)) {
-      return 0;
-   }
+	if ((error == 0) &&
+	    (le16_to_cpu(prsp->body.common.rsp.proc_id) == proc_id)) {
+		return 0;
+	}
 
-   return AS10X_CMD_ERROR;
+	return AS10X_CMD_ERROR;
 }
 
 

  reply	other threads:[~2011-10-30  7:12 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-25 12:33 Problems cloning the git repostories Patrick Dickey
2011-09-25 13:55 ` Devin Heitmueller
2011-09-26  3:25   ` Mauro Carvalho Chehab
2011-09-27  2:20     ` Devin Heitmueller
2011-09-27  7:44       ` Staging submission: PCTV 80e and PCTV 74e drivers (was Re: Problems cloning the git repostories) Stefan Richter
2011-09-27 17:43         ` Greg KH
2011-09-27 19:33           ` Stefan Richter
2011-10-15 20:54             ` [PATCH 0/7] Staging submission: PCTV 74e drivers and some cleanup (was: Staging submission: PCTV 80e and PCTV 74e drivers) Piotr Chmura
2011-10-17 22:31               ` Greg KH
2011-10-19 12:36                 ` Staging questions: WAS Re: [PATCH 0/7] Staging submission: PCTV 74e drivers and some cleanup Patrick Dickey
2011-10-19 13:57                   ` Devin Heitmueller
2011-10-20  3:44                     ` Mauro Carvalho Chehab
2011-10-20 10:53                       ` Patrick Dickey
2011-10-20 11:22                         ` Mauro Carvalho Chehab
     [not found]             ` <4E9992F9.7000101@poczta.onet.pl>
2011-10-15 20:54               ` [PATCH 2/7] staging/as102: add new device nBox DVB-T Dongle Piotr Chmura
2011-10-15 20:54               ` [PATCH 3/7] staging/as102: cleanup - get rid of typedefs Piotr Chmura
2011-10-15 20:54               ` [PATCH 4/7] staging/as102: cleanup - formatting code Piotr Chmura
2011-10-16 12:23                 ` Julian Andres Klode
2011-10-16 12:40                   ` Devin Heitmueller
2011-10-16 21:53                     ` Dan Carpenter
2011-10-15 20:54               ` [PATCH 5/7] staging as102: cleanup - get rid of pragma(pack) Piotr Chmura
     [not found]             ` <4E999733.2010802@poczta.onet.pl>
2011-10-15 20:54               ` [PATCH 1/7] Staging submission: PCTV 74e driver (as102) Piotr Chmura
2011-10-16  8:57                 ` Stefan Richter
2011-10-16 11:45                   ` Devin Heitmueller
2011-10-16 13:44                     ` Mauro Carvalho Chehab
2011-10-18  9:10                       ` [PATCH 0/14] staging/media/as102: new driver submission (was " Piotr Chmura
2011-10-18 15:52                         ` Devin Heitmueller
2011-10-18 17:20                           ` Piotr Chmura
2011-10-19 11:41                             ` Javier Martinez Canillas
2011-10-19 11:44                               ` Mauro Carvalho Chehab
2011-10-19 13:07                                 ` Piotr Chmura
     [not found]                       ` <20111018094647.d4982eb2.chmooreck@poczta.onet.pl>
2011-10-18  9:11                         ` [PATCH 1/14] staging/media/as102: initial import from Abilis Piotr Chmura
2011-10-18 16:24                           ` Dan Carpenter
2011-10-18 16:38                             ` Mauro Carvalho Chehab
2011-10-18 22:33                               ` Dan Carpenter
2011-10-18 19:46                           ` [RESEND PATCH " Piotr Chmura
2011-10-30 21:03                             ` Piotr Chmura
2011-10-30 21:25                               ` Stefan Richter
2011-10-31 10:24                               ` Sylwester Nawrocki
2011-10-18  9:11                         ` [PATCH 2/14] staging/media/as102: checkpatch fixes Piotr Chmura
2011-10-18 19:48                           ` [RESEND PATCH " Piotr Chmura
2011-10-18  9:11                         ` [PATCH 3/14] " Piotr Chmura
2011-10-18 19:50                           ` [RESEND PATCH " Piotr Chmura
2011-10-18  9:11                         ` [PATCH 4/14] " Piotr Chmura
2011-10-18 19:51                           ` [RESEND PATCH " Piotr Chmura
2011-10-29 10:22                             ` Sylwester Nawrocki
2011-10-29 13:17                               ` Piotr Chmura
2011-10-29 16:14                                 ` Sylwester Nawrocki
2011-10-29 17:48                                   ` Piotr Chmura
2011-10-29 21:37                                     ` Sylwester Nawrocki
2011-10-30  7:11                                       ` Piotr Chmura [this message]
2011-10-30 11:17                                         ` [PATCH v3 " Stefan Richter
2011-10-31 10:48                                           ` Stefan Richter
2011-10-31 11:47                                             ` Mauro Carvalho Chehab
2011-10-29 16:25                                 ` [RESEND PATCH " Piotr Chmura
2011-10-29 16:39                                   ` Sylwester Nawrocki
2011-10-29 17:00                                     ` Dan Carpenter
2011-10-18  9:11                         ` [PATCH 5/14] " Piotr Chmura
2011-10-18 19:54                           ` [RESEND PATCH " Piotr Chmura
2011-10-30 13:53                             ` [PATCH v3 " Piotr Chmura
2011-10-18  9:12                         ` [PATCH 6/14] " Piotr Chmura
2011-10-18 19:56                           ` [RESEND PATCH " Piotr Chmura
2011-10-18  9:12                         ` [PATCH 7/14] " Piotr Chmura
2011-10-18 19:57                           ` [RESEND PATCH " Piotr Chmura
2011-10-18  9:12                         ` [PATCH 8/14] " Piotr Chmura
2011-10-18 19:58                           ` [RESEND PATCH " Piotr Chmura
2011-10-18  9:12                         ` [PATCH 9/14] staging/media/as102: Add Elgato EyeTV DTT Deluxe Piotr Chmura
2011-10-18 19:59                           ` [RESEND PATCH " Piotr Chmura
2011-10-18  9:12                         ` [PATCH 10/14] staging/media/as102: properly handle multiple product names Piotr Chmura
2011-10-18 20:02                           ` [RESEND PATCH " Piotr Chmura
2011-10-18 20:28                             ` Joe Perches
2011-10-18 20:54                               ` Piotr Chmura
2011-10-18 20:56                                 ` Greg KH
2011-10-18 20:58                                 ` Joe Perches
2011-10-18  9:13                         ` [PATCH 11/14] staging/media/as102: fix compile warning about unused function Piotr Chmura
2011-10-18 20:03                           ` [RESEND PATCH " Piotr Chmura
2011-10-30 20:04                             ` Sylwester Nawrocki
2011-10-30 21:15                               ` Stefan Richter
2011-10-18  9:13                         ` [PATCH 12/14] staging/media/as102: fix licensing oversight Piotr Chmura
2011-10-18 20:05                           ` [RESEND PATCH " Piotr Chmura
2011-10-18  9:13                         ` [PATCH 13/14] staging/media/as102: fix compile Piotr Chmura
2011-10-18  9:13                         ` [PATCH 14/14] staging/media/as102: add nBox Tuner Dongle support Piotr Chmura
2011-10-15 20:55               ` [PATCH 6/7] staging/as102: cleanup - get rid of editor comments Piotr Chmura
2011-10-15 20:55               ` [PATCH 7/7] staging/as102: cleanup - get rid unnecessary LINUX and WIN32 defines Piotr Chmura
2011-10-30 21:09   ` Problems cloning the git repostories Marek Vasut
2011-09-25 14:53 ` Anca Emanuel
2011-09-25 18:03 ` Johannes Stezenbach
2011-09-26  2:56   ` Mauro Carvalho Chehab
2011-09-26 10:15     ` Scott Jiang
2011-09-26 19:24       ` Johannes Stezenbach
2011-09-26 11:27     ` Patrick Dickey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111030081156.14b70914@darkstar \
    --to=chmooreck@poczta.onet.pl \
    --cc=devel@driverdev.osuosl.org \
    --cc=dheitmueller@kernellabs.com \
    --cc=gregkh@suse.de \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=pdickeybeta@gmail.com \
    --cc=snjw23@gmail.com \
    --cc=stefanr@s5r6.in-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.