lkml.org 
[lkml]   [2014]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 2/3] ARM: mmc: davinci: Remove cast to the same type
    Date
    Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
    ---
    drivers/mmc/host/davinci_mmc.c | 10 ++++------
    1 file changed, 4 insertions(+), 6 deletions(-)

    diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
    index 8ea09ef..13ac664 100644
    --- a/drivers/mmc/host/davinci_mmc.c
    +++ b/drivers/mmc/host/davinci_mmc.c
    @@ -212,7 +212,7 @@ struct mmc_davinci_host {
    bool active_request;

    /* For PIO we walk scatterlists one segment at a time. */
    - unsigned int sg_len;
    + unsigned int sg_len;
    struct scatterlist *sg;

    /* Version of the MMC/SD controller */
    @@ -660,13 +660,11 @@ static unsigned int calculate_freq_for_card(struct mmc_davinci_host *host,

    mmc_pclk = host->mmc_input_clk;
    if (mmc_req_freq && mmc_pclk > (2 * mmc_req_freq))
    - mmc_push_pull_divisor = ((unsigned int)mmc_pclk
    - / (2 * mmc_req_freq)) - 1;
    + mmc_push_pull_divisor = (mmc_pclk / (2 * mmc_req_freq)) - 1;
    else
    mmc_push_pull_divisor = 0;

    - mmc_freq = (unsigned int)mmc_pclk
    - / (2 * (mmc_push_pull_divisor + 1));
    + mmc_freq = mmc_pclk / (2 * (mmc_push_pull_divisor + 1));

    if (mmc_freq > mmc_req_freq)
    mmc_push_pull_divisor = mmc_push_pull_divisor + 1;
    @@ -693,7 +691,7 @@ static void calculate_clk_divider(struct mmc_host *mmc, struct mmc_ios *ios)
    /* Ignoring the init clock value passed for fixing the inter
    * operability with different cards.
    */
    - open_drain_freq = ((unsigned int)host->mmc_input_clk
    + open_drain_freq = (host->mmc_input_clk
    / (2 * MMCSD_INIT_CLOCK)) - 1;

    if (open_drain_freq > 0xFF)
    --
    1.8.1.2


    \
     
     \ /
      Last update: 2014-01-22 13:21    [W:3.641 / U:0.296 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site