Commit graph

110 commits

Author SHA1 Message Date
Sankalp Negi a5a5b283a2 staging: mt7621-mmc: Fix line size exceeding 80 columns
This patch fixes checkpatch.pl warning and check:
WARNING: line over 80 characters
CHECK: Alignment should match open parenthesis

Signed-off-by: Sankalp Negi <sankalpnegi2310@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-01 10:52:48 +02:00
Colin Ian King e709e7fe49 staging: mt7621-mmc: fix spelling mistake: "Illgal" -> "Illegal"
Trivial fix to another spelling mistake in N_MSG message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25 18:44:13 +02:00
Colin Ian King dbbfae6af1 staging: mt7621-mmc: fix spelling mistake: "Eanable" -> "Enable"
Trivial fix to spelling mistake in N_MSG message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-20 14:44:12 +02:00
Christian Lütke-Stetzkamp b06b46059b staging: mt7621-mmc: Remove unused barrier macros
The current code has some barrier macros in it, which are already '#if
0' out, so just remove them.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:07 -07:00
Christian Lütke-Stetzkamp f18898631a staging: mt7621-mmc: Cleanup includes
This commit cleans the includes in the sd.c file. Those which are not
needed are removed, the remaining ones are sorted alphabetically.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:07 -07:00
Christian Lütke-Stetzkamp 47b7bae694 staging: mt7621-mmc: Remove unused macro HOST_MAX_NUM
The macro HOST_MAX_NUM is never used, so remove it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:07 -07:00
Christian Lütke-Stetzkamp a0381e2e28 staging: mt7621-mmc: Always use linked DMA mode
Current code uses linked DMA mode only when there is more than one
entry in the scatterlist. But the overhead of the linked DMA is very
small, so the code is easier when only using linked DMA and this is
also the way, the upstream driver mtk-sd handles it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:07 -07:00
Christian Lütke-Stetzkamp 759c05d317 staging: mt7621-mmc: Change return value of msdc_dma_config to void
The msdc_dma_config function currently returns always 0. Remove the
return and change to void.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:07 -07:00
Christian Lütke-Stetzkamp 37c6325b58 staging: mt7621-mmc: Don't disables DMA
Current code disables the DMA after the transfer. That only changes
the transfer mode to non-DMA and does not save any power. This is not
necessary any more, because now DMA transfer is always used. The macro
for disabling DMA transfer is also removed, because it is not used any
more.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:07 -07:00
Christian Lütke-Stetzkamp 32a966cb00 staging: mt7621-mmc: Inline function msdc_set_blknum
The function msdc_set_blknum consists of one (real) line of code and
is only called once, so inline it makes the code shorter and more
readable.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:07 -07:00
Christian Lütke-Stetzkamp 96a9789306 staging: mt7621-mmc: Remove initialisation in msdc_dma_config
Current code initialises the variable sg at the beginning of the
msdc_dma_config function. This is not necessary, because the variable
is assigned by the for_each_sg macro later on.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:07 -07:00
Christian Lütke-Stetzkamp f71774ac8a staging: mt7621-mmc: Remove redundant check for card status
Current code checks the card status at the beginning of
msdc_ops_request. This is not necessary because mmc core always checks
the card status before calling this operation.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:06 -07:00
Christian Lütke-Stetzkamp eafda89222 staging: mt7621-mmc: Do not BUG() if mrq set in msdc_ops_request
Currently the code BUG()'s, if host->mrq is set at the beginning of
msdc_ops_request. This shoould normally not happen, but it is not that
critical, because the critical sections are protected by a spin lock
and in the worst case, some commands to the card are lost, so it is
sufficient to just WARN_ON().

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:06 -07:00
Christian Lütke-Stetzkamp ec7375d1f5 staging: mt7621-mmc: Remove unused sdio irq code
Currently the code for the sdio irq is never used, because the flags
for it (MSDC_(EXT_)SDIO_IRQ) are never set. So the whole code for it
can be removed.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:06 -07:00
Christian Lütke-Stetzkamp 23f37ef71c staging: mt7621-mmc: Remove unused field abort from msdc_host
The field abort of msdc_host is only set, but never read, so it can be
removed.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:06 -07:00
Christian Lütke-Stetzkamp ec5e399edd staging: mt7621-mmc: Fix error number assignment
Currently the value that data->error is set to is converted to an
unsigned int, but it is a usual error number, so it should be
negative.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:06 -07:00
Christian Lütke-Stetzkamp eb7b0a9344 staging: mt7621-mmc: Remove unused variable dma_xfer from msdc_host
The field dma_xfer of the struct msdc_host is not used anymore, remove
it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:06 -07:00
Christian Lütke-Stetzkamp bcdcbfd533 staging: mt7621-mmc: Remove non-DMA transfer code
Currently the driver is capable of DMA and non-DMA transfer. But the
option to choose non-DMA transfer has already been removed. Now remove
also the code for the non-DMA transfer.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:06 -07:00
Christian Lütke-Stetzkamp f908abf3c6 staging: mt7621-mmc: Remove unused global dma_size
The global variable dma_size was previously used to select DMA or
non-DMA transfer mode based on the size of the data that should be
transferred. This option was removed preivously, so the variable is not
used any more and can be removed.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:06 -07:00
Christian Lütke-Stetzkamp 1e653f4fd5 staging: mt7621-mmc: Remove transfer mode setting variable
Currently the transfer mode can be chosen between DMA, a size
dependent mode and non-DMA by writing to a proc file. The upstream
driver mtk-sd uses DMA all times. The previous patch removed the
ability to set that option.

Now the remaining uses of the transfer mode setting variable are
cleaned up, because it cannot be changed any more.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp 67cfac33a8 staging: mt7621-mmc: Remove transfer mode setting from proc
Currently the transfer mode can be chosen between DMA, a size
dependent mode and non-DMA by writing to a proc file. The upstream
driver mtk-sd uses DMA all times.

There is no apparent reason why somebody would like to change the
transfer mode and the position of the setting in the debug part of the
driver also indicates, that the option was used for debugging
purposes. So it is removed to clean up the driver and bring it more in
line with the upstream one.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp ab4ce1140a staging: mt7621-mmc: Remove unused static msdc_regs
The static variable msdc_regs is set once, but never used, so remove
it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp 8f1c27c981 staging: mt7621-mmc: Replace macro sdr_get_field with function
Currently sdr_get_field is a macro, to bring the code in line with the
upstream driver mtk-sd, it is changed to a function.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp bffcc2e923 staging: mt7621-mmc: Replace macro sdr_set_field with function
Currently sdr_set_field is a macro, to bring the code in line with the
upstream driver mtk-sd, it is changed to a function.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp 35af3110d4 staging: mt7621-mmc: Remove function uffs
The function uffs that is implemented by this driver returns the same
values as the kernel function ffs. So the uffs function is removed and
the calls to it are replaced with calls to ffs.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp a9392b099c staging: mt7621-mmc: Remove unused macros sdr_{read,write}16
The sdr_{read,write}16 macros are never used and does not provide any
information about the device, so they are removed.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp 36b730101d staging: mt7621-mmc: Remove unused macro msdc_init_gpd_ex
The macro msdc_init_gpd_ex is never used and does not provied any
information about the hardware, so it is removed.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp a3edb7c1ef staging: mt7621-mmc: Remove unused field clk_drv from msdc_hw
The field clk_drv of msdc_hw is set to a constant and only used once,
replace that position with the constant and remove the unused field.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:05 -07:00
Christian Lütke-Stetzkamp a1972612c8 staging: mt7621-mmc: Remove unused field cmd_drv from msdc_hw
The field cmd_drv of msdc_hw is set to a constant and only used once,
replace that position with the constant and remove the unused field.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:04 -07:00
Christian Lütke-Stetzkamp f46a0ae597 staging: mt7621-mmc: Remove unused field dat_drv from msdc_hw
The field dat_drv of msdc_hw is set to a constant and only used once,
replace that position with the constant and remove the unused field.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:04 -07:00
Christian Lütke-Stetzkamp 9133f0e338 staging: mt7621-mmc: Remove unused field data_edge from msdc_hw
The field data_edge of msdc_hw is set to a constant and only used once,
replace that position with the constant and remove the unused field.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:04 -07:00
Christian Lütke-Stetzkamp b001fa3cdf staging: mt7621-mmc: Remove unused field cmd_edge from msdc_hw
The field cmd_edge of msdc_hw is set to a constant and only used once,
replace that position with the constant and remove the unused field.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:04 -07:00
Christian Lütke-Stetzkamp ace488268a staging: mt7621-mmc: Fix typo in function parameters
The type pm_message does not exist in the kernel, the correct type is
pm_message_t, so the type of the parameter is corrected.

Fixes: 9673d9f6f4 ("staging: mt7621-mmc: Refactor suspend, resume")
Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:08:04 -07:00
Christian Lütke-Stetzkamp e396de684e staging: mt7621-mmc: Fix calculation typo in msdc_init_gpd_bd
When refactoring the function msdc_init_gpd_bd, an error in the
calculation of the bd.next address was introduced. The offset has to
be added to the base address, not multiplied.

Fixes: 8f2395586c ("staging: mt7621-mmc: Refactor msdc_init_gpd_bd")
Reported-by: NeilBrown <neil@brown.name>
Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Tested-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:20 +02:00
Christian Lütke-Stetzkamp 2175b6157a staging: mt7621-mmc: Remove unused card_workqueue from msdc_host
The card_workqueue field of msdc_host is already if 0'd out and there
are no references to it in the code (not even in unused code), so
remove it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:20 +02:00
Christian Lütke-Stetzkamp f74369b7a4 staging: mt7621-mmc: Remove old references to tasklet
In the current code there are '#if 0' out references on using a
tasklet instead of delayed_work. Removing these improves readability.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:20 +02:00
Christian Lütke-Stetzkamp 884c06af72 staging: mt7621-mmc: Add annotations about held locks
The functions msdc_command_resp and msdc_do_request are always called
with the host->lock lock held. By adding annotations, sparse is
informed about that.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:20 +02:00
Christian Lütke-Stetzkamp 0b78f05d51 staging: mt7621-mmc: Correct datatypes for io and sanitize io access
Current code discard the address space information on the base address
of the mmc controller, that causes sparse warnings. It uses the raw
read write function, that is correct for the mips architecture (little
endian), but for portability the non-raw function should be used. Also
the clear/set bit macros do direct memory access, that is also correct
for mips, but not portable.

So the type of the base address is changed to void __iomem *, that is
the type returned by the ioremap function. The set/clear bit macros
are changed to functions, that use the portable read and write
functions. The use of the raw access functions is changed to use the
non-raw ones.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:19 +02:00
Christian Lütke-Stetzkamp 78f350830e staging: mt7621-mmc: Replace dma dir with mmc_get_dma_dir
Currently the dma direction is manually determined by the read status,
there is a more portable function for it, mmc_get_dma_dir, use it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:19 +02:00
Christian Lütke-Stetzkamp c302214c9d staging: mt7621-mmc: Fix dma_map_sg may map to fewer entries
The dma_map_sg function may merge several sglist entries into one, the
return value has to be saved to consider that. The data->sg_count
field is the position, where it should be saved, like it is done in
other mmc host drivers. Also the count of mapped entries is needed for
the dma setup.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:19 +02:00
Christian Lütke-Stetzkamp 05e41c96a6 staging: mt7621-mmc: Remove multiple assignments
Fix checkpatch: multiple assignments should be avoided, to improve
readability.
It aslo moves the second assignment out of the if/else block, that is
valid, because drv_mode is of type msdc_mode, an enum with only those
three elements, so one of the if/ else if statements is always
taken. And the second assignment can happen after the conditions.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:19 +02:00
Christian Lütke-Stetzkamp afcc0ca1c8 staging: mt7621-mmc: Fix dereference before check in msdc_drv_pm
In the msdc_drv_pm function the variable mmc is dereferenced before
checked. Reordering fixes that.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25 15:36:19 +02:00
Christian Lütke-Stetzkamp 7860778b17 staging: mt7621-mmc: Remove unused field dma_addr of msdc_host
The dma_addr field of msdc_host is never used, so remove it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:57 +02:00
Christian Lütke-Stetzkamp c8f203a6f0 staging: mt7621-mmc: Remove unused field cmd_rsp_done of msdc_host
The cmd_rsp_done field of msdc_host is never used, so remove it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:57 +02:00
Christian Lütke-Stetzkamp 5045adc1c8 staging: mt7621-mmc: Remove unused field cmd_r1b_done in msdc_host
The field cmd_r1b_done in msdc_host is unused, so remove it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:57 +02:00
Christian Lütke-Stetzkamp 095fbc1d4e staging: mt7621-mmc: Remove unused field dma_left_size of msdc_host
The dma_left_size field of msdc_host is never used, remove it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:55 +02:00
Christian Lütke-Stetzkamp c89f0ec952 staging: mt7621:mmc: Remove unused field reserved from msdc_host
The reserved field of msdc_host is never used and msdc_host is also
never exposed to hardware, so remove that field.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:55 +02:00
Christian Lütke-Stetzkamp ed4ba29e02 staging: mt7621-mmc: Remove unused field starttime from msdc_host
The starttime field of msdc_host is never used, remove it.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:55 +02:00
Christian Lütke-Stetzkamp 8cfb4937af staging: mt7621-mmc: Change default transfer mode to DMA
The current default transfer is to use DMA or not depending on the
size of the data. The upstream driver mtk-sd uses DMA all times,
change the standard mode here to DMA for testing, if there are any
performance problems with DMA for small data sizes. If not, the option
for transfer mode should be removed in the future,

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:55 +02:00
Christian Lütke-Stetzkamp 8f2395586c staging: mt7621-mmc: Refactor msdc_init_gpd_bd
The msdc_init_gpd_bd function is currently hard to read, because of
old, commented out code and a while loop, where a for loop is much
easier to read. Refactor it to make the code more readable.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23 15:37:54 +02:00