[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM=Q2csDWfV5wy1LNX2=JP38t7FAtrGxxq9D7v-wX81j0paLSg@mail.gmail.com>
Date: Thu, 29 Mar 2012 14:01:52 +0530
From: Shubhrajyoti Datta <omaplinuxkernel@...il.com>
To: "DebBarma, Tarun Kanti" <tarun.kanti@...com>
Cc: Shubhrajyoti D <shubhrajyoti@...com>,
spi-devel-general@...ts.sourceforge.net,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
Benoit Cousson <b-cousson@...com>
Subject: Re: [PATCH v2 1/5] spi/omap: Remove bus_num usage for instance index
Hi Tarun,
On Wed, Mar 28, 2012 at 2:15 PM, DebBarma, Tarun Kanti
<tarun.kanti@...com> wrote:
> On Mon, Mar 26, 2012 at 7:14 PM, Shubhrajyoti D <shubhrajyoti@...com> wrote:
>> From: Benoit Cousson <b-cousson@...com>
>>
>> bus_num was used to reference the mcspi controller instance in a fixed array.
>> Remove this array and store this information directly inside drvdata structure.
>>
>> bus_num is now just set if the pdev->id is present or with -1 for dynamic
>> allocation by SPI core, but the driver does not access it anymore.
>>
>> Clean some bad comments format, and remove un-needed space.
>>
>> Signed-off-by: Benoit Cousson <b-cousson@...com>
>> [Cleanup the OMAP2_MCSPI_MAX_CTRL macro as it is not needed anymore]
>> Signed-off-by: Shubhrajyoti D <shubhrajyoti@...com>
>> ---
>> drivers/spi/spi-omap2-mcspi.c | 75 ++++++++++++++++++----------------------
>> 1 files changed, 34 insertions(+), 41 deletions(-)
>>
>> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
>> index bb9274c..7785091 100644
>> --- a/drivers/spi/spi-omap2-mcspi.c
>> +++ b/drivers/spi/spi-omap2-mcspi.c
>> @@ -45,9 +45,6 @@
>>
<snip>
>>
>> tmp = OMAP2_MCSPI_WAKEUPENABLE_WKEN;
>> mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE, tmp);
>> - omap2_mcspi_ctx[master->bus_num - 1].wakeupenable = tmp;
>> + ctx->wakeupenable = tmp;
> Can't we get rid of tmp now? For example:
> ctx->wakeupenable = OMAP2_MCSPI_WAKEUPENABLE_WKEN;
> mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE, ctx->wakeupenable);
Yes the tmp variable could be optimized
since it is in addition to the $SUBJECT will do it in a separate patch .
Is that fine?
> --
> Tarun
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists