Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d55efa4d authored by Thiago Farina's avatar Thiago Farina Committed by Mark Brown
Browse files

regulator: Make use of rdev_get_id() function where possible.

parent 38dbfb59
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -92,7 +92,7 @@ MODULE_DEVICE_TABLE(of, pfuze_dt_ids);
static int pfuze100_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
static int pfuze100_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
{
{
	struct pfuze_chip *pfuze100 = rdev_get_drvdata(rdev);
	struct pfuze_chip *pfuze100 = rdev_get_drvdata(rdev);
	int id = rdev->desc->id;
	int id = rdev_get_id(rdev);
	unsigned int ramp_bits;
	unsigned int ramp_bits;
	int ret;
	int ret;


+2 −2
Original line number Original line Diff line number Diff line
@@ -65,7 +65,7 @@ static int s2mps11_regulator_set_voltage_time_sel(struct regulator_dev *rdev,
	unsigned int ramp_delay = 0;
	unsigned int ramp_delay = 0;
	int old_volt, new_volt;
	int old_volt, new_volt;


	switch (rdev->desc->id) {
	switch (rdev_get_id(rdev)) {
	case S2MPS11_BUCK2:
	case S2MPS11_BUCK2:
		ramp_delay = s2mps11->ramp_delay2;
		ramp_delay = s2mps11->ramp_delay2;
		break;
		break;
@@ -105,7 +105,7 @@ static int s2mps11_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
	unsigned int ramp_enable = 1, enable_shift = 0;
	unsigned int ramp_enable = 1, enable_shift = 0;
	int ret;
	int ret;


	switch (rdev->desc->id) {
	switch (rdev_get_id(rdev)) {
	case S2MPS11_BUCK1:
	case S2MPS11_BUCK1:
		if (ramp_delay > s2mps11->ramp_delay16)
		if (ramp_delay > s2mps11->ramp_delay16)
			s2mps11->ramp_delay16 = ramp_delay;
			s2mps11->ramp_delay16 = ramp_delay;