@@ -315,44 +315,6 @@ static void tmio_mmc_reset_work(struct work_struct *work)
315
315
mmc_request_done (host -> mmc , mrq );
316
316
}
317
317
318
- static void tmio_mmc_finish_request (struct tmio_mmc_host * host )
319
- {
320
- struct mmc_request * mrq ;
321
- unsigned long flags ;
322
-
323
- spin_lock_irqsave (& host -> lock , flags );
324
-
325
- mrq = host -> mrq ;
326
- if (IS_ERR_OR_NULL (mrq )) {
327
- spin_unlock_irqrestore (& host -> lock , flags );
328
- return ;
329
- }
330
-
331
- host -> cmd = NULL ;
332
- host -> data = NULL ;
333
- host -> force_pio = false;
334
-
335
- cancel_delayed_work (& host -> delayed_reset_work );
336
-
337
- host -> mrq = NULL ;
338
- spin_unlock_irqrestore (& host -> lock , flags );
339
-
340
- if (mrq -> cmd -> error || (mrq -> data && mrq -> data -> error ))
341
- tmio_mmc_abort_dma (host );
342
-
343
- if (host -> check_scc_error )
344
- host -> check_scc_error (host );
345
-
346
- mmc_request_done (host -> mmc , mrq );
347
- }
348
-
349
- static void tmio_mmc_done_work (struct work_struct * work )
350
- {
351
- struct tmio_mmc_host * host = container_of (work , struct tmio_mmc_host ,
352
- done );
353
- tmio_mmc_finish_request (host );
354
- }
355
-
356
318
/* These are the bitmasks the tmio chip requires to implement the MMC response
357
319
* types. Note that R1 and R6 are the same in this scheme. */
358
320
#define APP_CMD 0x0040
@@ -945,6 +907,44 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
945
907
tmio_process_mrq (host , mrq );
946
908
}
947
909
910
+ static void tmio_mmc_finish_request (struct tmio_mmc_host * host )
911
+ {
912
+ struct mmc_request * mrq ;
913
+ unsigned long flags ;
914
+
915
+ spin_lock_irqsave (& host -> lock , flags );
916
+
917
+ mrq = host -> mrq ;
918
+ if (IS_ERR_OR_NULL (mrq )) {
919
+ spin_unlock_irqrestore (& host -> lock , flags );
920
+ return ;
921
+ }
922
+
923
+ host -> cmd = NULL ;
924
+ host -> data = NULL ;
925
+ host -> force_pio = false;
926
+
927
+ cancel_delayed_work (& host -> delayed_reset_work );
928
+
929
+ host -> mrq = NULL ;
930
+ spin_unlock_irqrestore (& host -> lock , flags );
931
+
932
+ if (mrq -> cmd -> error || (mrq -> data && mrq -> data -> error ))
933
+ tmio_mmc_abort_dma (host );
934
+
935
+ if (host -> check_scc_error )
936
+ host -> check_scc_error (host );
937
+
938
+ mmc_request_done (host -> mmc , mrq );
939
+ }
940
+
941
+ static void tmio_mmc_done_work (struct work_struct * work )
942
+ {
943
+ struct tmio_mmc_host * host = container_of (work , struct tmio_mmc_host ,
944
+ done );
945
+ tmio_mmc_finish_request (host );
946
+ }
947
+
948
948
static int tmio_mmc_clk_enable (struct tmio_mmc_host * host )
949
949
{
950
950
if (!host -> clk_enable )
0 commit comments