common: Drop init.h from common header
[oweals/u-boot.git] / cmd / host.c
index 080b7cfb1d8243dcfbcb091c704486723a160602..eefc4f255ef2fcfe3b69f57cc4ce789ca033bd08 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2012, Google Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -9,6 +8,7 @@
 #include <fs.h>
 #include <part.h>
 #include <sandboxblockdev.h>
+#include <dm/device_compat.h>
 #include <linux/errno.h>
 
 static int host_curr_device = -1;
@@ -90,7 +90,7 @@ static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc,
                struct host_block_dev *host_dev;
 
 #ifdef CONFIG_BLK
-               host_dev = dev_get_priv(blk_dev->bdev);
+               host_dev = dev_get_platdata(blk_dev->bdev);
 #else
                host_dev = blk_dev->priv;
 #endif
@@ -168,11 +168,6 @@ static int do_host(cmd_tbl_t *cmdtp, int flag, int argc,
                return CMD_RET_USAGE;
 }
 
-U_BOOT_CMD(
-       sb,     8,      1,      do_host,
-       "Deprecated: use 'host' command instead.", ""
-);
-
 U_BOOT_CMD(
        host, 8, 1, do_host,
        "Miscellaneous host commands",