]> Zhao Yanbai Git Server - minix.git/commitdiff
mmc: various small fixes
authorDavid van Moolenbroek <david@minix3.org>
Fri, 12 Oct 2012 12:54:08 +0000 (12:54 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Mon, 15 Oct 2012 11:50:58 +0000 (11:50 +0000)
- call blockdriver_announce() on startup;
- restart statelessly after a crash;
- resolve a clang warning.

drivers/mmc/mmcblk.c

index c5a15506e8d0a6eaab7bb792901578b291de98a0..f9ad1bc28ad0cc9f83796e870082d7bd9146f9ca 100644 (file)
@@ -351,7 +351,7 @@ block_transfer(dev_t minor, /* minor device number */
                        return EINVAL;
                }
 
-               if (ciov->iov_size == 0 || ciov->iov_size < 0) {
+               if (ciov->iov_size <= 0) {
                        mmc_log_warn(&log,
                            "Invalid iov size for iov %d of %d size\n",
                            counter, nr_req, ciov->iov_size);
@@ -543,7 +543,6 @@ sef_local_startup()
         */
        sef_setcb_init_fresh(block_system_event_cb);
        sef_setcb_init_lu(block_system_event_cb);
-       sef_setcb_init_restart(block_system_event_cb);
 
        /* Register a signal handler */
        sef_setcb_signal_handler(block_signal_handler_cb);
@@ -575,6 +574,7 @@ block_system_event_cb(int type, sef_init_info_t * info)
                mmc_log_info(&log, "System event framework post restart\n");
                break;
        }
+       blockdriver_announce(type);
        return OK;
 }