mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 05:50:17 +00:00 
			
		
		
		
	vbe: Use blk_read() to read blocks
We should not be using the old blk_d...() interface, is only there to aid migration to driver model. Move to blk_read() instead. Changes in v2: - Split patch into several pieces Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
		
							parent
							
								
									21dd873572
								
							
						
					
					
						commit
						a1c456d199
					
				@ -44,7 +44,7 @@ static int simple_read_version(struct udevice *dev, struct blk_desc *desc,
 | 
			
		||||
		return log_msg_ret("get", -EBADF);
 | 
			
		||||
	start /= MMC_MAX_BLOCK_LEN;
 | 
			
		||||
 | 
			
		||||
	if (blk_dread(desc, start, 1, buf) != 1)
 | 
			
		||||
	if (blk_read(desc->bdev, start, 1, buf) != 1)
 | 
			
		||||
		return log_msg_ret("read", -EIO);
 | 
			
		||||
	strlcpy(state->fw_version, buf, MAX_VERSION_LEN);
 | 
			
		||||
	log_debug("version=%s\n", state->fw_version);
 | 
			
		||||
@ -68,7 +68,7 @@ static int simple_read_nvdata(struct udevice *dev, struct blk_desc *desc,
 | 
			
		||||
		return log_msg_ret("get", -EBADF);
 | 
			
		||||
	start /= MMC_MAX_BLOCK_LEN;
 | 
			
		||||
 | 
			
		||||
	if (blk_dread(desc, start, 1, buf) != 1)
 | 
			
		||||
	if (blk_read(desc->bdev, start, 1, buf) != 1)
 | 
			
		||||
		return log_msg_ret("read", -EIO);
 | 
			
		||||
	nvd = (struct simple_nvdata *)buf;
 | 
			
		||||
	hdr_ver = (nvd->hdr & NVD_HDR_VER_MASK) >> NVD_HDR_VER_SHIFT;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user