lkml.org 
[lkml]   [2012]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/5] spi/omap: Remove bus_num usage for instance index
From
Hi Tarun,

On Wed, Mar 28, 2012 at 2:15 PM, DebBarma, Tarun Kanti
<tarun.kanti@ti.com> wrote:
> On Mon, Mar 26, 2012 at 7:14 PM, Shubhrajyoti D <shubhrajyoti@ti.com> wrote:
>> From: Benoit Cousson <b-cousson@ti.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@ti.com>
>> [Cleanup the OMAP2_MCSPI_MAX_CTRL macro as it is not needed anymore]
>> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-03-29 10:35    [W:0.065 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site