Hi Girish,
On Fri, Sep 23 2011, Girish K S wrote:
> + default:
> + pr_warning("%s: Voltage range not supported "
> + "for power class.\n", mmc_hostname(host));
> + break;
> + }
I suggested replacing your BUG(); here with a return, but you just have
a break here. Is having the function continue in this case intentional?
> +
> + pwrclass_val = ext_csd[index];
> +
> + if (bus_width & (EXT_CSD_BUS_WIDTH_8 | EXT_CSD_DDR_BUS_WIDTH_8))
> + pwrclass_val = (pwrclass_val & EXT_CSD_PWR_CL_8BIT_MASK) >>
> + EXT_CSD_PWR_CL_8BIT_SHIFT;
> + else
> + pwrclass_val = (pwrclass_val & EXT_CSD_PWR_CL_4BIT_MASK) >>
> + EXT_CSD_PWR_CL_4BIT_SHIFT;
> +
> + /* If the power class is different from the default value */
> + if (pwrclass_val > 0) {
> + err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
> + EXT_CSD_POWER_CLASS,
> + pwrclass_val,
> + 0);
> + }
> +
> + return err;
> +}
Thanks,
- Chris.
--
Chris Ball <[email protected]> <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html