mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-29 13:57:58 -04:00
wifi: ath10k: drop gpio_led reference
The driver uses a 'struct gpio_led' internally, but does not actually interact with the gpio_led driver, in particular it does not actually use gpiolib here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Link: https://patch.msgid.link/20260428162955.614739-1-arnd@kernel.org Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
committed by
Jeff Johnson
parent
1e8ab2e2e9
commit
f8b7c2f1a4
@@ -1269,7 +1269,6 @@ struct ath10k {
|
||||
} testmode;
|
||||
|
||||
struct {
|
||||
struct gpio_led wifi_led;
|
||||
struct led_classdev cdev;
|
||||
char label[48];
|
||||
u32 gpio_state_pin;
|
||||
|
||||
@@ -19,15 +19,13 @@ static int ath10k_leds_set_brightness_blocking(struct led_classdev *led_cdev,
|
||||
{
|
||||
struct ath10k *ar = container_of(led_cdev, struct ath10k,
|
||||
leds.cdev);
|
||||
struct gpio_led *led = &ar->leds.wifi_led;
|
||||
|
||||
mutex_lock(&ar->conf_mutex);
|
||||
|
||||
if (ar->state != ATH10K_STATE_ON)
|
||||
goto out;
|
||||
|
||||
ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low;
|
||||
ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, ar->leds.gpio_state_pin);
|
||||
ath10k_wmi_gpio_output(ar, ar->hw_params.led_pin, brightness == LED_OFF);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ar->conf_mutex);
|
||||
@@ -63,13 +61,9 @@ int ath10k_leds_register(struct ath10k *ar)
|
||||
|
||||
snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s",
|
||||
wiphy_name(ar->hw->wiphy));
|
||||
ar->leds.wifi_led.active_low = 1;
|
||||
ar->leds.wifi_led.name = ar->leds.label;
|
||||
ar->leds.wifi_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
|
||||
|
||||
ar->leds.cdev.name = ar->leds.label;
|
||||
ar->leds.cdev.brightness_set_blocking = ath10k_leds_set_brightness_blocking;
|
||||
ar->leds.cdev.default_trigger = ar->leds.wifi_led.default_trigger;
|
||||
|
||||
ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user