Drop the 'device' argument from libratbag_device_set_active_profile

The profile is bound to a device anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2015-08-24 11:11:10 +10:00
parent cea9bc6290
commit 3782b37853
3 changed files with 6 additions and 8 deletions

View File

@@ -585,9 +585,9 @@ ratbag_device_has_capability(const struct ratbag_device *device,
}
LIBRATBAG_EXPORT int
ratbag_device_set_active_profile(struct ratbag_device *device,
struct ratbag_profile *profile)
ratbag_device_set_active_profile(struct ratbag_profile *profile)
{
struct ratbag_device *device = profile->device;
int rc;
assert(device->driver->write_profile);

View File

@@ -344,14 +344,12 @@ ratbag_device_get_active_profile(struct ratbag_device *ratbag);
*
* This function sets the currently active profile to the one provided.
*
* @param ratbag A previously initialized ratbag context
* @param profile The profile to make the active profile.
*
* @return 0 on success or nonzero otherwise.
*/
int
ratbag_device_set_active_profile(struct ratbag_device *ratbag,
struct ratbag_profile *profile);
ratbag_device_set_active_profile(struct ratbag_profile *profile);
/**
* @ingroup device

View File

@@ -339,7 +339,7 @@ ratbag_cmd_switch_profile(struct ratbag *ratbag, uint32_t flags, int argc, char
}
if (active_profile != profile) {
rc = ratbag_device_set_active_profile(device, profile);
rc = ratbag_device_set_active_profile(profile);
if (!rc)
printf("Switched '%s' to profile '%d'\n",
ratbag_device_get_name(device), index);
@@ -418,7 +418,7 @@ ratbag_cmd_switch_etekcity(struct ratbag *ratbag, uint32_t flags, int argc, char
if (!commit)
goto out;
rc = ratbag_device_set_active_profile(device, profile);
rc = ratbag_device_set_active_profile(profile);
if (!rc)
printf("Switched the current profile of '%s' to %sreport the volume keys\n",
ratbag_device_get_name(device),
@@ -489,7 +489,7 @@ ratbag_cmd_change_button(struct ratbag *ratbag, uint32_t flags, int argc, char *
goto out;
}
rc = ratbag_device_set_active_profile(device, profile);
rc = ratbag_device_set_active_profile(profile);
if (rc) {
error("Unable to apply the current profile: %s (%d)\n",
strerror(-rc),