mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-04 06:54:27 -05:00 
			
		
		
		
	USB driver fixes * fix compiler warning in adm5120-hcd.c * allocate mem_resource with the correct size * fix driver name in the platform device structure
SVN-Revision: 8331
This commit is contained in:
		
							parent
							
								
									c592d03090
								
							
						
					
					
						commit
						ce520f5424
					
				@ -97,7 +97,7 @@ struct resource adm5120_usbc_resources[] = {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct platform_device adm5120_usbc_device = {
 | 
			
		||||
	.name		= "adm5120-usbc",
 | 
			
		||||
	.name		= "adm5120-hcd",
 | 
			
		||||
	.id		= -1,
 | 
			
		||||
	.num_resources	= ARRAY_SIZE(adm5120_usbc_resources),
 | 
			
		||||
	.resource	= adm5120_usbc_resources,
 | 
			
		||||
 | 
			
		||||
@ -766,7 +766,7 @@ static int admhcd_sw_reset(struct admhcd *ahcd)
 | 
			
		||||
			break;
 | 
			
		||||
	}
 | 
			
		||||
	if (!retries) {
 | 
			
		||||
		printk(KERN_WARNING "%s Software reset timeout\n", hcd_name);
 | 
			
		||||
		printk(KERN_WARNING "%s: software reset timeout\n", hcd_name);
 | 
			
		||||
		ret = -ETIME;
 | 
			
		||||
	}
 | 
			
		||||
	spin_unlock_irqrestore(&ahcd->lock, flags);
 | 
			
		||||
@ -794,7 +794,8 @@ static int admhcd_reset(struct usb_hcd *hcd)
 | 
			
		||||
                        break;
 | 
			
		||||
        }
 | 
			
		||||
        if (!val) {
 | 
			
		||||
                printk(KERN_WARNING "Device not ready after %dms\n", timeout);
 | 
			
		||||
                printk(KERN_WARNING "%s: device not ready after %dms\n",
 | 
			
		||||
			hcd_name, timeout);
 | 
			
		||||
                ret = -ENODEV;
 | 
			
		||||
        }
 | 
			
		||||
        return ret;
 | 
			
		||||
@ -869,14 +870,13 @@ static int __init adm5120hcd_probe(struct platform_device *pdev)
 | 
			
		||||
                goto out;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!request_mem_region(data->start, 2, hcd_name)) {
 | 
			
		||||
        if (!request_mem_region(data->start, resource_len(data), hcd_name)) {
 | 
			
		||||
		printk(KERN_DEBUG PFX "cannot request memory regions for the data resource\n");
 | 
			
		||||
                err = -EBUSY;
 | 
			
		||||
                goto out;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        data_reg = ioremap(data->start, resource_len(data));
 | 
			
		||||
 | 
			
		||||
        if (data_reg == NULL) {
 | 
			
		||||
		printk(KERN_DEBUG PFX "unable to ioremap\n");
 | 
			
		||||
                err = -ENOMEM;
 | 
			
		||||
@ -887,7 +887,7 @@ static int __init adm5120hcd_probe(struct platform_device *pdev)
 | 
			
		||||
        if (!hcd) {
 | 
			
		||||
		printk(KERN_DEBUG PFX "unable to create the hcd\n");
 | 
			
		||||
		err = -ENOMEM;
 | 
			
		||||
                goto out_mem;
 | 
			
		||||
                goto out_unmap;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	hcd->rsrc_start = data->start;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user