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

Commit 6354b7e2 authored by Hans Duedal's avatar Hans Duedal Committed by Jiri Kosina
Browse files

HID: roccat: Fix code style issues



Missing whitespace, semi-colon after macro, and a duplicated out of
memory message.

Signed-off-by: default avatarHans Duedal <hans.duedal@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent b905811a
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -46,6 +46,7 @@ static void kone_profile_activated(struct kone_device *kone, uint new_profile)
static void kone_profile_report(struct kone_device *kone, uint new_profile)
static void kone_profile_report(struct kone_device *kone, uint new_profile)
{
{
	struct kone_roccat_report roccat_report;
	struct kone_roccat_report roccat_report;

	roccat_report.event = kone_mouse_event_switch_profile;
	roccat_report.event = kone_mouse_event_switch_profile;
	roccat_report.value = new_profile;
	roccat_report.value = new_profile;
	roccat_report.key = 0;
	roccat_report.key = 0;
@@ -163,6 +164,7 @@ static int kone_set_settings(struct usb_device *usb_dev,
		struct kone_settings const *settings)
		struct kone_settings const *settings)
{
{
	int retval;
	int retval;

	retval = kone_send(usb_dev, kone_command_settings,
	retval = kone_send(usb_dev, kone_command_settings,
			settings, sizeof(struct kone_settings));
			settings, sizeof(struct kone_settings));
	if (retval)
	if (retval)
@@ -387,7 +389,7 @@ static struct bin_attribute bin_attr_profile##number = { \
	.read = kone_sysfs_read_profilex,			\
	.read = kone_sysfs_read_profilex,			\
	.write = kone_sysfs_write_profilex,			\
	.write = kone_sysfs_write_profilex,			\
	.private = &profile_numbers[number-1],			\
	.private = &profile_numbers[number-1],			\
};
}
PROFILE_ATTR(1);
PROFILE_ATTR(1);
PROFILE_ATTR(2);
PROFILE_ATTR(2);
PROFILE_ATTR(3);
PROFILE_ATTR(3);
@@ -456,6 +458,7 @@ static ssize_t kone_sysfs_show_tcu(struct device *dev,
static int kone_tcu_command(struct usb_device *usb_dev, int number)
static int kone_tcu_command(struct usb_device *usb_dev, int number)
{
{
	unsigned char value;
	unsigned char value;

	value = number;
	value = number;
	return kone_send(usb_dev, kone_command_calibrate, &value, 1);
	return kone_send(usb_dev, kone_command_calibrate, &value, 1);
}
}
@@ -697,10 +700,8 @@ static int kone_init_specials(struct hid_device *hdev)
			== USB_INTERFACE_PROTOCOL_MOUSE) {
			== USB_INTERFACE_PROTOCOL_MOUSE) {


		kone = kzalloc(sizeof(*kone), GFP_KERNEL);
		kone = kzalloc(sizeof(*kone), GFP_KERNEL);
		if (!kone) {
		if (!kone)
			hid_err(hdev, "can't alloc device descriptor\n");
			return -ENOMEM;
			return -ENOMEM;
		}
		hid_set_drvdata(hdev, kone);
		hid_set_drvdata(hdev, kone);


		retval = kone_init_kone_device_struct(usb_dev, kone);
		retval = kone_init_kone_device_struct(usb_dev, kone);