forked from mirrors/linux
		
	regulator: core: remove machine init callback from config
The machine specific regulator_init() appears to be unused. It does not allow a lot of interaction with the regulator framework, since nothing from the framework is passed along (desc, config, etc ...) Machine specific init may also be done with the added init_cb() in the regulator description, so remove regulator_init(). Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://patch.msgid.link/20241008-regulator-ignored-data-v2-3-d1251e0ee507@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
		
							parent
							
								
									cfcdf395c2
								
							
						
					
					
						commit
						602ff58ae4
					
				
					 2 changed files with 1 additions and 9 deletions
				
			
		| 
						 | 
					@ -5775,13 +5775,6 @@ regulator_register(struct device *dev,
 | 
				
			||||||
		resolved_early = true;
 | 
							resolved_early = true;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* perform any regulator specific init */
 | 
					 | 
				
			||||||
	if (init_data && init_data->regulator_init) {
 | 
					 | 
				
			||||||
		ret = init_data->regulator_init(rdev->reg_data);
 | 
					 | 
				
			||||||
		if (ret < 0)
 | 
					 | 
				
			||||||
			goto wash;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (config->ena_gpiod) {
 | 
						if (config->ena_gpiod) {
 | 
				
			||||||
		ret = regulator_ena_gpio_request(rdev, config);
 | 
							ret = regulator_ena_gpio_request(rdev, config);
 | 
				
			||||||
		if (ret != 0) {
 | 
							if (ret != 0) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -285,8 +285,7 @@ struct regulator_init_data {
 | 
				
			||||||
	int num_consumer_supplies;
 | 
						int num_consumer_supplies;
 | 
				
			||||||
	struct regulator_consumer_supply *consumer_supplies;
 | 
						struct regulator_consumer_supply *consumer_supplies;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* optional regulator machine specific init */
 | 
						/* optional regulator machine specific data */
 | 
				
			||||||
	int (*regulator_init)(void *driver_data);
 | 
					 | 
				
			||||||
	void *driver_data;	/* core does not touch this */
 | 
						void *driver_data;	/* core does not touch this */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue