]> git.sur5r.net Git - u-boot/blobdiff - drivers/scsi/scsi.c
net: sun8i-emac: set mux and clock by driver data
[u-boot] / drivers / scsi / scsi.c
index f192ca597c61cbb2d8047b4a973f0530fa344007..16246bec2b3152b3c3f8228a23b70e88a21cae6c 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2001
  * Denis Peter, MPL AG Switzerland
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -580,7 +579,7 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose)
        */
        snprintf(str, sizeof(str), "id%dlun%d", id, lun);
        ret = blk_create_devicef(dev, "scsi_blk", str, IF_TYPE_SCSI, -1,
-                       bd.blksz, bd.blksz * bd.lba, &bdev);
+                       bd.blksz, bd.lba, &bdev);
        if (ret) {
                debug("Can't create device\n");
                return ret;
@@ -682,7 +681,7 @@ int scsi_scan(bool verbose)
 
        printf("Found %d device(s).\n", scsi_max_devs);
 #ifndef CONFIG_SPL_BUILD
-       setenv_ulong("scsidevs", scsi_max_devs);
+       env_set_ulong("scsidevs", scsi_max_devs);
 #endif
        return 0;
 }