mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()
Start using the new helper that does the refcounted allocations. Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com> Link: https://lore.kernel.org/r/20250331-b4-panel-refcounting-v4-4-dad50c60c6c9@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
		
							parent
							
								
									c5a635f58e
								
							
						
					
					
						commit
						de04bb0089
					
				
					 1 changed files with 4 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -579,9 +579,10 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
 | 
			
		|||
	u32 bus_flags;
 | 
			
		||||
	int err;
 | 
			
		||||
 | 
			
		||||
	panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
 | 
			
		||||
	if (!panel)
 | 
			
		||||
		return -ENOMEM;
 | 
			
		||||
	panel = devm_drm_panel_alloc(dev, struct panel_simple, base,
 | 
			
		||||
				     &panel_simple_funcs, desc->connector_type);
 | 
			
		||||
	if (IS_ERR(panel))
 | 
			
		||||
		return PTR_ERR(panel);
 | 
			
		||||
 | 
			
		||||
	panel->desc = desc;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -694,8 +695,6 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
 | 
			
		|||
	pm_runtime_set_autosuspend_delay(dev, 1000);
 | 
			
		||||
	pm_runtime_use_autosuspend(dev);
 | 
			
		||||
 | 
			
		||||
	drm_panel_init(&panel->base, dev, &panel_simple_funcs, connector_type);
 | 
			
		||||
 | 
			
		||||
	err = drm_panel_of_backlight(&panel->base);
 | 
			
		||||
	if (err) {
 | 
			
		||||
		dev_err_probe(dev, err, "Could not find backlight\n");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue