From d62984220bd3ef0dff135895577b5b2b1bd5dd17 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Tue, 12 Dec 2023 01:51:21 +0300 Subject: [PATCH] driver-hidpp20: remove unused static function Fixes warning about unused function hidpp20drv_current_profile. Also, it looks like it was missing 'rc == 0' check at the end. --- src/driver-hidpp20.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 52bcd99e..6e7dfaa4 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -742,22 +742,6 @@ hidpp20drv_update_led(struct ratbag_led *led) return RATBAG_ERROR_CAPABILITY; } -static int -hidpp20drv_current_profile(struct ratbag_device *device) -{ - struct hidpp20drv_data *drv_data = ratbag_get_drv_data((struct ratbag_device *)device); - int rc; - - if (!(drv_data->capabilities & HIDPP_CAP_ONBOARD_PROFILES_8100)) - return 0; - - rc = hidpp20_onboard_profiles_get_current_profile(drv_data->dev); - if (rc < 0) - return rc; - - return rc - 1; -} - static int hidpp20drv_set_current_profile(struct ratbag_device *device, unsigned int index) {