linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johnny Kim <johnny.kim@atmel.com>
To: Tony Cho <tony.cho@atmel.com>
Cc: <linux-wireless@vger.kernel.org>, <chris.park@atmel.com>,
	<rachel.kim@atmel.com>, <austin.shin@atmel.com>,
	<glen.lee@atmel.com>, <leo.kim@atmel.com>, <jude.lee@atmel.com>,
	<robin.hwang@atmel.com>
Subject: Re: [PATCH V2 1/5] staging: wilc1000: #ifdef conditionals cover entire functions
Date: Thu, 30 Jul 2015 18:19:24 +0900	[thread overview]
Message-ID: <55B9EC1C.3000909@atmel.com> (raw)
In-Reply-To: <1438247414-19708-2-git-send-email-tony.cho@atmel.com>

Your patch has wrong sentence.
Please remove "---" ASCHI
Loot at below line.

On 2015년 07월 30일 18:10, Tony Cho wrote:
> This patch lets preprocessor conditionals (#ifdef) related to
> WILC_SDIO_IRQ_GPIO to compile out the entire functions. Compiling out
> the entire functions is preferred rather than portions of functions or
> expressions becausue doing so makes code harder to read.
>
> Signed-off-by: Tony Cho <tony.cho@atmel.com>
> ---
> V2: Remove the warnings on the following:
> - ERROR: space required before the open parenthesis '('
> This patch is resent because unexpected warning is added while rewriting
> codes.
> ---
remove --- text

>   drivers/staging/wilc1000/wilc_sdio.c | 480 +++++++++++++++++++++--------------
>   1 file changed, 292 insertions(+), 188 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c
> index 5a18148..c52044a 100644
> --- a/drivers/staging/wilc1000/wilc_sdio.c
> +++ b/drivers/staging/wilc1000/wilc_sdio.c
> @@ -155,22 +155,9 @@ _fail_:
>   	return 0;
>   }
>   
> +#ifdef WILC_SDIO_IRQ_GPIO
>   static int sdio_clear_int(void)
>   {
> -#ifndef WILC_SDIO_IRQ_GPIO
> -	/* uint32_t sts; */
> -	sdio_cmd52_t cmd;
> -
> -	cmd.read_write = 0;
> -	cmd.function = 1;
> -	cmd.raw = 0;
> -	cmd.address = 0x4;
> -	cmd.data = 0;
> -	g_sdio.sdio_cmd52(&cmd);
> -	int_clrd++;
> -
> -	return cmd.data;
> -#else
>   	uint32_t reg;
>   
>   	if (!sdio_read_reg(WILC_HOST_RX_CTRL_0, &reg)) {
> @@ -181,9 +168,23 @@ static int sdio_clear_int(void)
>   	sdio_write_reg(WILC_HOST_RX_CTRL_0, reg);
>   	int_clrd++;
>   	return 1;
> -#endif
> +}
> +#else
> +static int sdio_clear_int(void)
> +{
> +	sdio_cmd52_t cmd;
> +
> +	cmd.read_write = 0;
> +	cmd.function = 1;
> +	cmd.raw = 0;
> +	cmd.address = 0x4;
> +	cmd.data = 0;
> +	g_sdio.sdio_cmd52(&cmd);
> +	int_clrd++;
>   
> +	return cmd.data;
>   }
> +#endif /* WILC_SDIO_IRQ_GPIO */
>   
>   uint32_t sdio_xfer_cnt(void)
>   {
> @@ -521,9 +522,11 @@ static int sdio_deinit(void *pv)
>   	return 1;
>   }
>   
> +#ifdef WILC_SDIO_IRQ_GPIO
>   static int sdio_sync(void)
>   {
>   	uint32_t reg;
> +	int ret;
>   
>   	/**
>   	 *      Disable power sequencer
> @@ -539,45 +542,60 @@ static int sdio_sync(void)
>   		return 0;
>   	}
>   
> -#ifdef WILC_SDIO_IRQ_GPIO
> -	{
> -		uint32_t reg;
> -		int ret;
> +	/**
> +	 *      interrupt pin mux select
> +	 **/
> +	ret = sdio_read_reg(WILC_PIN_MUX_0, &reg);
> +	if (!ret) {
> +		g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_PIN_MUX_0);
> +		return 0;
> +	}
> +	reg |= (1 << 8);
> +	ret = sdio_write_reg(WILC_PIN_MUX_0, reg);
> +	if (!ret) {
> +		g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_PIN_MUX_0);
> +		return 0;
> +	}
>   
> -		/**
> -		 *      interrupt pin mux select
> -		 **/
> -		ret = sdio_read_reg(WILC_PIN_MUX_0, &reg);
> -		if (!ret) {
> -			g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_PIN_MUX_0);
> -			return 0;
> -		}
> -		reg |= (1 << 8);
> -		ret = sdio_write_reg(WILC_PIN_MUX_0, reg);
> -		if (!ret) {
> -			g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_PIN_MUX_0);
> -			return 0;
> -		}
> +	/**
> +	 *      interrupt enable
> +	 **/
> +	ret = sdio_read_reg(WILC_INTR_ENABLE, &reg);
> +	if (!ret) {
> +		g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_INTR_ENABLE);
> +		return 0;
> +	}
> +	reg |= (1 << 16);
> +	ret = sdio_write_reg(WILC_INTR_ENABLE, reg);
> +	if (!ret) {
> +		g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE);
> +		return 0;
> +	}
>   
> -		/**
> -		 *      interrupt enable
> -		 **/
> -		ret = sdio_read_reg(WILC_INTR_ENABLE, &reg);
> -		if (!ret) {
> -			g_sdio.dPrint(N_ERR, "[wilc spi]: Failed read reg (%08x)...\n", WILC_INTR_ENABLE);
> -			return 0;
> -		}
> -		reg |= (1 << 16);
> -		ret = sdio_write_reg(WILC_INTR_ENABLE, reg);
> -		if (!ret) {
> -			g_sdio.dPrint(N_ERR, "[wilc spi]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE);
> -			return 0;
> -		}
> +	return 1;
> +}
> +#else
> +static int sdio_sync(void)
> +{
> +	uint32_t reg;
> +
> +	/**
> +	 *      Disable power sequencer
> +	 **/
> +	if (!sdio_read_reg(WILC_MISC, &reg)) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read misc reg...\n");
> +		return 0;
> +	}
> +
> +	reg &= ~(1 << 8);
> +	if (!sdio_write_reg(WILC_MISC, reg)) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write misc reg...\n");
> +		return 0;
>   	}
> -#endif
>   
>   	return 1;
>   }
> +#endif /* WILC_SDIO_IRQ_GPIO */
>   
>   static int sdio_init(wilc_wlan_inp_t *inp, wilc_debug_func func)
>   {
> @@ -744,18 +762,40 @@ static int sdio_read_size(uint32_t *size)
>   	return 1;
>   }
>   
> +#ifdef WILC_SDIO_IRQ_GPIO
>   static int sdio_read_int(uint32_t *int_status)
>   {
> +	uint32_t tmp;
> +	sdio_cmd52_t cmd;
> +	uint32_t irq_flags;
> +
> +	sdio_read_size(&tmp);
> +
> +	cmd.read_write = 0;
> +	cmd.function = 0;
> +	cmd.raw = 0;
> +	cmd.address = 0xf7;
> +	cmd.data = 0;
> +	g_sdio.sdio_cmd52(&cmd);
> +	irq_flags = cmd.data & 0x1f;
> +	tmp |= ((irq_flags >> 0) << IRG_FLAGS_OFFSET);
> +
> +	*int_status = tmp;
>   
> +	return 1;
> +}
> +#else
> +static int sdio_read_int(uint32_t *int_status)
> +{
>   	uint32_t tmp;
>   	sdio_cmd52_t cmd;
> +	int i;
>   
>   	sdio_read_size(&tmp);
>   
>   	/**
>   	 *      Read IRQ flags
>   	 **/
> -#ifndef WILC_SDIO_IRQ_GPIO
>   	/* cmd.read_write = 0; */
>   	cmd.function = 1;
>   	/* cmd.raw = 0; */
> @@ -775,54 +815,29 @@ static int sdio_read_int(uint32_t *int_status)
>   		tmp |= INT_4;
>   	if (cmd.data & (1 << 6))
>   		tmp |= INT_5;
> -	{
> -		int i;
>   
> -		for (i = g_sdio.nint; i < MAX_NUM_INT; i++) {
> -			if ((tmp >> (IRG_FLAGS_OFFSET + i)) & 0x1) {
> -				g_sdio.dPrint(N_ERR, "[wilc sdio]: Unexpected interrupt (1) : tmp=%x, data=%x\n", tmp, cmd.data);
> -				break;
> -			}
> +	for (i = g_sdio.nint; i < MAX_NUM_INT; i++) {
> +		if ((tmp >> (IRG_FLAGS_OFFSET + i)) & 0x1) {
> +			g_sdio.dPrint(N_ERR, "[wilc sdio]: Unexpected interrupt (1) : tmp=%x, data=%x\n", tmp, cmd.data);
> +			break;
>   		}
>   	}
> -#else
> -	{
> -		uint32_t irq_flags;
> -
> -		cmd.read_write = 0;
> -		cmd.function = 0;
> -		cmd.raw = 0;
> -		cmd.address = 0xf7;
> -		cmd.data = 0;
> -		g_sdio.sdio_cmd52(&cmd);
> -		irq_flags = cmd.data & 0x1f;
> -		tmp |= ((irq_flags >> 0) << IRG_FLAGS_OFFSET);
> -	}
> -
> -#endif
>   
>   	*int_status = tmp;
>   
>   	return 1;
>   }
> +#endif	/* WILC_SDIO_IRQ_GPIO */
>   
> +#ifdef WILC_SDIO_IRQ_GPIO
>   static int sdio_clear_int_ext(uint32_t val)
>   {
>   	int ret;
>   
> -	if (g_sdio.has_thrpt_enh3) {
> +	if(g_sdio.has_thrpt_enh3) {
>   		uint32_t reg;
> +		reg = val & ((1 << MAX_NUN_INT_THRPT_ENH2) - 1);
>   
> -#ifdef WILC_SDIO_IRQ_GPIO
> -		{
> -			uint32_t flags;
> -
> -			flags = val & ((1 << MAX_NUN_INT_THRPT_ENH2) - 1);
> -			reg = flags;
> -		}
> -#else
> -		reg = 0;
> -#endif
>   		/* select VMM table 0 */
>   		if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
>   			reg |= (1 << 5);
> @@ -849,76 +864,135 @@ static int sdio_clear_int_ext(uint32_t val)
>   
>   		}
>   	} else {
> -#ifdef WILC_SDIO_IRQ_GPIO
> -		{
> -			/* see below. has_thrpt_enh2 uses register 0xf8 to clear interrupts. */
> -			/* Cannot clear multiple interrupts. Must clear each interrupt individually */
> -			uint32_t flags;
> -
> -			flags = val & ((1 << MAX_NUM_INT) - 1);
> -			if (flags) {
> -				int i;
> -
> -				ret = 1;
> -				for (i = 0; i < g_sdio.nint; i++) {
> -					if (flags & 1) {
> -						sdio_cmd52_t cmd;
> -
> -						cmd.read_write = 1;
> -						cmd.function = 0;
> -						cmd.raw = 0;
> -						cmd.address = 0xf8;
> -						cmd.data = (1 << i);
> -
> -						ret = g_sdio.sdio_cmd52(&cmd);
> -						if (!ret) {
> -							g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__);
> -							goto _fail_;
> -						}
> -
> +		/* see below. has_thrpt_enh2 uses register 0xf8 to clear interrupts. */
> +		/* Cannot clear multiple interrupts. Must clear each interrupt individually */
> +		uint32_t flags;
> +		uint32_t vmm_ctl;
> +
> +		flags = val & ((1 << MAX_NUM_INT) - 1);
> +		if (flags) {
> +			int i;
> +
> +			ret = 1;
> +			for (i = 0; i < g_sdio.nint; i++) {
> +				if (flags & 1) {
> +					sdio_cmd52_t cmd;
> +
> +					cmd.read_write = 1;
> +					cmd.function = 0;
> +					cmd.raw = 0;
> +					cmd.address = 0xf8;
> +					cmd.data = (1 << i);
> +
> +					ret = g_sdio.sdio_cmd52(&cmd);
> +					if (!ret) {
> +						g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__);
> +						goto _fail_;
>   					}
> -					if (!ret)
> -						break;
> -					flags >>= 1;
>   				}
>   				if (!ret)
> -					goto _fail_;
> -				for (i = g_sdio.nint; i < MAX_NUM_INT; i++) {
> -					if (flags & 1)
> -						g_sdio.dPrint(N_ERR, "[wilc sdio]: Unexpected interrupt cleared %d...\n", i);
> -					flags >>= 1;
> -				}
> +					break;
> +				flags >>= 1;
> +			}
> +			if (!ret)
> +				goto _fail_;
> +			for (i = g_sdio.nint; i < MAX_NUM_INT; i++) {
> +				if (flags & 1)
> +					g_sdio.dPrint(N_ERR, "[wilc sdio]: Unexpected interrupt cleared %d...\n", i);
> +				flags >>= 1;
>   			}
>   		}
> -#endif /* WILC_SDIO_IRQ_GPIO */
>   
> -		{
> -			uint32_t vmm_ctl;
> -
> -			vmm_ctl = 0;
> -			/* select VMM table 0 */
> -			if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
> -				vmm_ctl |= (1 << 0);
> -			/* select VMM table 1 */
> -			if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1)
> -				vmm_ctl |= (1 << 1);
> -			/* enable VMM */
> -			if ((val & EN_VMM) == EN_VMM)
> -				vmm_ctl |= (1 << 2);
> -
> -			if (vmm_ctl) {
> -				sdio_cmd52_t cmd;
> -
> -				cmd.read_write = 1;
> -				cmd.function = 0;
> -				cmd.raw = 0;
> -				cmd.address = 0xf6;
> -				cmd.data = vmm_ctl;
> -				ret = g_sdio.sdio_cmd52(&cmd);
> -				if (!ret) {
> -					g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf6 data (%d) ...\n", __LINE__);
> -					goto _fail_;
> -				}
> +		vmm_ctl = 0;
> +		/* select VMM table 0 */
> +		if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
> +			vmm_ctl |= (1 << 0);
> +		/* select VMM table 1 */
> +		if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1)
> +			vmm_ctl |= (1 << 1);
> +		/* enable VMM */
> +		if ((val & EN_VMM) == EN_VMM)
> +			vmm_ctl |= (1 << 2);
> +
> +		if (vmm_ctl) {
> +			sdio_cmd52_t cmd;
> +
> +			cmd.read_write = 1;
> +			cmd.function = 0;
> +			cmd.raw = 0;
> +			cmd.address = 0xf6;
> +			cmd.data = vmm_ctl;
> +			ret = g_sdio.sdio_cmd52(&cmd);
> +			if (!ret) {
> +				g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf6 data (%d) ...\n", __LINE__);
> +				goto _fail_;
> +			}
> +		}
> +	}
> +
> +	return 1;
> +_fail_:
> +	return 0;
> +}
> +#else
> +static int sdio_clear_int_ext(uint32_t val)
> +{
> +	int ret;
> +
> +	if (g_sdio.has_thrpt_enh3) {
> +		uint32_t reg = 0;
> +
> +		/* select VMM table 0 */
> +		if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
> +			reg |= (1 << 5);
> +		/* select VMM table 1 */
> +		if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1)
> +			reg |= (1 << 6);
> +		/* enable VMM */
> +		if ((val & EN_VMM) == EN_VMM)
> +			reg |= (1 << 7);
> +		if (reg) {
> +			sdio_cmd52_t cmd;
> +
> +			cmd.read_write = 1;
> +			cmd.function = 0;
> +			cmd.raw = 0;
> +			cmd.address = 0xf8;
> +			cmd.data = reg;
> +
> +			ret = g_sdio.sdio_cmd52(&cmd);
> +			if (!ret) {
> +				g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__);
> +				goto _fail_;
> +			}
> +
> +		}
> +	} else {
> +		uint32_t vmm_ctl;
> +
> +		vmm_ctl = 0;
> +		/* select VMM table 0 */
> +		if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
> +			vmm_ctl |= (1 << 0);
> +		/* select VMM table 1 */
> +		if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1)
> +			vmm_ctl |= (1 << 1);
> +		/* enable VMM */
> +		if ((val & EN_VMM) == EN_VMM)
> +			vmm_ctl |= (1 << 2);
> +
> +		if (vmm_ctl) {
> +			sdio_cmd52_t cmd;
> +
> +			cmd.read_write = 1;
> +			cmd.function = 0;
> +			cmd.raw = 0;
> +			cmd.address = 0xf6;
> +			cmd.data = vmm_ctl;
> +			ret = g_sdio.sdio_cmd52(&cmd);
> +			if (!ret) {
> +				g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf6 data (%d) ...\n", __LINE__);
> +				goto _fail_;
>   			}
>   		}
>   	}
> @@ -927,10 +1001,13 @@ static int sdio_clear_int_ext(uint32_t val)
>   _fail_:
>   	return 0;
>   }
> +#endif	/* WILC_SDIO_IRQ_GPIO */
>   
> +#ifdef WILC_SDIO_IRQ_GPIO
>   static int sdio_sync_ext(int nint /*  how mant interrupts to enable. */)
>   {
>   	uint32_t reg;
> +	int ret, i;
>   
>   	if (nint > MAX_NUM_INT) {
>   		g_sdio.dPrint(N_ERR, "[wilc sdio]: Too many interupts (%d)...\n", nint);
> @@ -957,62 +1034,89 @@ static int sdio_sync_ext(int nint /*  how mant interrupts to enable. */)
>   		return 0;
>   	}
>   
> -#ifdef WILC_SDIO_IRQ_GPIO
> -	{
> -		uint32_t reg;
> -		int ret, i;
> +	/**
> +	 *      interrupt pin mux select
> +	 **/
> +	ret = sdio_read_reg(WILC_PIN_MUX_0, &reg);
> +	if (!ret) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read reg (%08x)...\n", WILC_PIN_MUX_0);
> +		return 0;
> +	}
> +	reg |= (1 << 8);
> +	ret = sdio_write_reg(WILC_PIN_MUX_0, reg);
> +	if (!ret) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write reg (%08x)...\n", WILC_PIN_MUX_0);
> +		return 0;
> +	}
>   
> -		/**
> -		 *      interrupt pin mux select
> -		 **/
> -		ret = sdio_read_reg(WILC_PIN_MUX_0, &reg);
> -		if (!ret) {
> -			g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read reg (%08x)...\n", WILC_PIN_MUX_0);
> -			return 0;
> -		}
> -		reg |= (1 << 8);
> -		ret = sdio_write_reg(WILC_PIN_MUX_0, reg);
> -		if (!ret) {
> -			g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write reg (%08x)...\n", WILC_PIN_MUX_0);
> -			return 0;
> -		}
> +	/**
> +	 *      interrupt enable
> +	 **/
> +	ret = sdio_read_reg(WILC_INTR_ENABLE, &reg);
> +	if (!ret) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read reg (%08x)...\n", WILC_INTR_ENABLE);
> +		return 0;
> +	}
>   
> -		/**
> -		 *      interrupt enable
> -		 **/
> -		ret = sdio_read_reg(WILC_INTR_ENABLE, &reg);
> +	for (i = 0; (i < 5) && (nint > 0); i++, nint--)
> +		reg |= (1 << (27 + i));
> +	ret = sdio_write_reg(WILC_INTR_ENABLE, reg);
> +	if (!ret) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE);
> +		return 0;
> +	}
> +	if (nint) {
> +		ret = sdio_read_reg(WILC_INTR2_ENABLE, &reg);
>   		if (!ret) {
> -			g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read reg (%08x)...\n", WILC_INTR_ENABLE);
> +			g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read reg (%08x)...\n", WILC_INTR2_ENABLE);
>   			return 0;
>   		}
>   
> -		for (i = 0; (i < 5) && (nint > 0); i++, nint--)
> -			reg |= (1 << (27 + i));
> -		ret = sdio_write_reg(WILC_INTR_ENABLE, reg);
> +		for (i = 0; (i < 3) && (nint > 0); i++, nint--)
> +			reg |= (1 << i);
> +
> +		ret = sdio_read_reg(WILC_INTR2_ENABLE, &reg);
>   		if (!ret) {
> -			g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write reg (%08x)...\n", WILC_INTR_ENABLE);
> +			g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write reg (%08x)...\n", WILC_INTR2_ENABLE);
>   			return 0;
>   		}
> -		if (nint) {
> -			ret = sdio_read_reg(WILC_INTR2_ENABLE, &reg);
> -			if (!ret) {
> -				g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read reg (%08x)...\n", WILC_INTR2_ENABLE);
> -				return 0;
> -			}
> +	}
>   
> -			for (i = 0; (i < 3) && (nint > 0); i++, nint--)
> -				reg |= (1 << i);
> +	return 1;
> +}
> +#else
> +static int sdio_sync_ext(int nint /*  how mant interrupts to enable. */)
> +{
> +	uint32_t reg;
>   
> -			ret = sdio_read_reg(WILC_INTR2_ENABLE, &reg);
> -			if (!ret) {
> -				g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write reg (%08x)...\n", WILC_INTR2_ENABLE);
> -				return 0;
> -			}
> -		}
> +	if (nint > MAX_NUM_INT) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Too many interupts (%d)...\n", nint);
> +		return 0;
>   	}
> -#endif /* WILC_SDIO_IRQ_GPIO */
> +	if (nint > MAX_NUN_INT_THRPT_ENH2) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Error: Cannot support more than 5 interrupts when has_thrpt_enh2=1.\n");
> +		return 0;
> +	}
> +
> +	g_sdio.nint = nint;
> +
> +	/**
> +	 *      Disable power sequencer
> +	 **/
> +	if (!sdio_read_reg(WILC_MISC, &reg)) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed read misc reg...\n");
> +		return 0;
> +	}
> +
> +	reg &= ~(1 << 8);
> +	if (!sdio_write_reg(WILC_MISC, reg)) {
> +		g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed write misc reg...\n");
> +		return 0;
> +	}
> +
>   	return 1;
>   }
> +#endif	/* WILC_SDIO_IRQ_GPIO */
>   
>   /********************************************
>    *


  reply	other threads:[~2015-07-30  9:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  9:10 [PATCH 0/5] 2nd patch for illegal coding style Tony Cho
2015-07-30  9:10 ` [PATCH V2 1/5] staging: wilc1000: #ifdef conditionals cover entire functions Tony Cho
2015-07-30  9:19   ` Johnny Kim [this message]
2015-07-30 11:56   ` Sudip Mukherjee
     [not found]     ` <55BAEB08.8090705@atmel.com>
2015-07-31  3:48       ` Greg KH
2015-07-30  9:10 ` [PATCH V2 2/5] staging: wilc1000: remove unnecessary blank lines Tony Cho
2015-07-30  9:10 ` [PATCH V2 3/5] staging: wilc1000: remove warnings on missing blank line Tony Cho
2015-07-30 12:10   ` Sudip Mukherjee
2015-07-30  9:10 ` [PATCH V2 4/5] staging: wilc1000: remove errors on required space Tony Cho
2015-07-30  9:10 ` [PATCH V2 5/5] staging: wilc1000: remove unused functions Tony Cho
2015-07-31  3:49 ` [PATCH 0/5] 2nd patch for illegal coding style Greg KH

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=55B9EC1C.3000909@atmel.com \
    --to=johnny.kim@atmel.com \
    --cc=austin.shin@atmel.com \
    --cc=chris.park@atmel.com \
    --cc=glen.lee@atmel.com \
    --cc=jude.lee@atmel.com \
    --cc=leo.kim@atmel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rachel.kim@atmel.com \
    --cc=robin.hwang@atmel.com \
    --cc=tony.cho@atmel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).