mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	drm/imx/dcss: request memory region
The driver's memory regions are currently just ioremap()ed, but not reserved through a request. That's not a bug, but having the request is a little more robust. Implement the region-request through the corresponding managed devres-function. Signed-off-by: Philipp Stanner <pstanner@redhat.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240124111904.18261-3-pstanner@redhat.com
This commit is contained in:
		
							parent
							
								
									041261ac4c
								
							
						
					
					
						commit
						90393c9b54
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -170,6 +170,7 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
 | 
			
		|||
	struct resource *res;
 | 
			
		||||
	struct dcss_dev *dcss;
 | 
			
		||||
	const struct dcss_type_data *devtype;
 | 
			
		||||
	resource_size_t res_len;
 | 
			
		||||
 | 
			
		||||
	devtype = of_device_get_match_data(dev);
 | 
			
		||||
	if (!devtype) {
 | 
			
		||||
| 
						 | 
				
			
			@ -183,6 +184,12 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
 | 
			
		|||
		return ERR_PTR(-EINVAL);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	res_len = res->end - res->start;
 | 
			
		||||
	if (!devm_request_mem_region(dev, res->start, res_len, "dcss")) {
 | 
			
		||||
		dev_err(dev, "cannot request memory region\n");
 | 
			
		||||
		return ERR_PTR(-EBUSY);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	dcss = kzalloc(sizeof(*dcss), GFP_KERNEL);
 | 
			
		||||
	if (!dcss)
 | 
			
		||||
		return ERR_PTR(-ENOMEM);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue