Re: [PATCH v2 3/4] mmc: core: turn hw_reset into a bus_ops

Johan Rudholm
2014-11-05T14:41:00Z

Hi Adrian,

2014-11-05 13:10 GMT+01:00 Adrian Hunter <adrian.hunter@intel.com>:
> On 04/11/14 17:07, Johan Rudholm wrote:
>> Move the (e)MMC specific hw_reset code from core.c into mmc.c and call
>> it from the new bus_ops member hw_reset. This also lets us add code
>> for reseting SD cards as well.
>>
>> Signed-off-by: Johan Rudholm <johanru@axis.com>
>> ---
>> drivers/mmc/card/mmc_test.c | 3 --
>> drivers/mmc/core/core.c | 48 ++++++++----------------------------------
>> drivers/mmc/core/core.h | 4 +++
>> drivers/mmc/core/mmc.c | 37 +++++++++++++++++++++++++++++++++
>> include/linux/mmc/core.h | 1 -
>> 5 files changed, 50 insertions(+), 43 deletions(-)
>>
>> diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
>> index 0c0fc52..2cd3385 100644
>> --- a/drivers/mmc/card/mmc_test.c
>> +++ b/drivers/mmc/card/mmc_test.c
>> @@ -2349,9 +2349,6 @@ static int mmc_test_hw_reset(struct mmc_test_card *test)
>> if (err != -EOPNOTSUPP)
>> return err;
>>
>> - if (!mmc_can_reset(card))
>> - return RESULT_UNSUP_CARD;
>> -
>
> I would like to retain the ability for mmc_test to distinguish
> RESULT_UNSUP_CARD from RESULT_UNSUP_HOST

Ok, coming up in v3, thanks.

//Johan