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

Commit a1ef5039 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville
Browse files

rt2800: make rt2800_init_bbp return void



This function can not fail, we always return 0.

Signed-off-by: default avatarStanislaw Gruszka <stf_xl@wp.pl>
Acked-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f91f5f05
Loading
Loading
Loading
Loading
+5 −9
Original line number Original line Diff line number Diff line
@@ -4027,20 +4027,16 @@ static void rt2800_init_bbp_5592(struct rt2x00_dev *rt2x00dev)
		rt2800_bbp_write(rt2x00dev, 103, 0xc0);
		rt2800_bbp_write(rt2x00dev, 103, 0xc0);
}
}


static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
static void rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
{
{
	unsigned int i;
	unsigned int i;
	u16 eeprom;
	u16 eeprom;
	u8 reg_id;
	u8 reg_id;
	u8 value;
	u8 value;


	if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev) ||
		     rt2800_wait_bbp_ready(rt2x00dev)))
		return -EACCES;

	if (rt2x00_rt(rt2x00dev, RT5592)) {
	if (rt2x00_rt(rt2x00dev, RT5592)) {
		rt2800_init_bbp_5592(rt2x00dev);
		rt2800_init_bbp_5592(rt2x00dev);
		return 0;
		return;
	}
	}


	if (rt2x00_rt(rt2x00dev, RT3352)) {
	if (rt2x00_rt(rt2x00dev, RT3352)) {
@@ -4337,8 +4333,6 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
			rt2800_bbp_write(rt2x00dev, reg_id, value);
			rt2800_bbp_write(rt2x00dev, reg_id, value);
		}
		}
	}
	}

	return 0;
}
}


static void rt2800_led_open_drain_enable(struct rt2x00_dev *rt2x00dev)
static void rt2800_led_open_drain_enable(struct rt2x00_dev *rt2x00dev)
@@ -5189,9 +5183,11 @@ int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev)
	}
	}
	msleep(1);
	msleep(1);


	if (unlikely(rt2800_init_bbp(rt2x00dev)))
	if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev) ||
		     rt2800_wait_bbp_ready(rt2x00dev)))
		return -EIO;
		return -EIO;


	rt2800_init_bbp(rt2x00dev);
	rt2800_init_rfcsr(rt2x00dev);
	rt2800_init_rfcsr(rt2x00dev);


	if (rt2x00_is_usb(rt2x00dev) &&
	if (rt2x00_is_usb(rt2x00dev) &&