Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
cb7c02e9
Commit
cb7c02e9
authored
Oct 05, 2022
by
Benjamin Tissoires
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-6.1/google' into for-linus
- convert to use dev_groups (Greg Kroah-Hartman)
parents
1145c3d5
9f4441fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
19 deletions
+22
-19
drivers/hid/hid-google-hammer.c
drivers/hid/hid-google-hammer.c
+3
-1
drivers/hid/hid-vivaldi-common.c
drivers/hid/hid-vivaldi-common.c
+15
-14
drivers/hid/hid-vivaldi-common.h
drivers/hid/hid-vivaldi-common.h
+1
-3
drivers/hid/hid-vivaldi.c
drivers/hid/hid-vivaldi.c
+3
-1
No files found.
drivers/hid/hid-google-hammer.c
View file @
cb7c02e9
...
...
@@ -608,9 +608,11 @@ static struct hid_driver hammer_driver = {
.
probe
=
hammer_probe
,
.
remove
=
hammer_remove
,
.
feature_mapping
=
vivaldi_feature_mapping
,
.
input_configured
=
vivaldi_input_configured
,
.
input_mapping
=
hammer_input_mapping
,
.
event
=
hammer_event
,
.
driver
=
{
.
dev_groups
=
vivaldi_attribute_groups
,
},
};
static
int
__init
hammer_init
(
void
)
...
...
drivers/hid/hid-vivaldi-common.c
View file @
cb7c02e9
...
...
@@ -116,25 +116,26 @@ static struct attribute *vivaldi_sysfs_attrs[] = {
NULL
};
static
const
struct
attribute_group
vivaldi_attribute_group
=
{
.
attrs
=
vivaldi_sysfs_attrs
,
};
/**
* vivaldi_input_configured - Complete initialization of device using vivaldi map
* @hdev: HID device to which vivaldi attributes should be attached
* @hidinput: HID input device (unused)
*/
int
vivaldi_input_configured
(
struct
hid_device
*
hdev
,
struct
hid_input
*
hidinput
)
static
umode_t
vivaldi_is_visible
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
int
n
)
{
struct
hid_device
*
hdev
=
to_hid_device
(
kobj_to_dev
(
kobj
));
struct
vivaldi_data
*
data
=
hid_get_drvdata
(
hdev
);
if
(
!
data
->
num_function_row_keys
)
return
0
;
return
devm_device_add_group
(
&
hdev
->
dev
,
&
vivaldi_attribute_group
);
return
attr
->
mode
;
}
EXPORT_SYMBOL_GPL
(
vivaldi_input_configured
);
static
const
struct
attribute_group
vivaldi_attribute_group
=
{
.
attrs
=
vivaldi_sysfs_attrs
,
.
is_visible
=
vivaldi_is_visible
,
};
const
struct
attribute_group
*
vivaldi_attribute_groups
[]
=
{
&
vivaldi_attribute_group
,
NULL
,
};
EXPORT_SYMBOL_GPL
(
vivaldi_attribute_groups
);
MODULE_LICENSE
(
"GPL"
);
drivers/hid/hid-vivaldi-common.h
View file @
cb7c02e9
...
...
@@ -4,13 +4,11 @@
struct
hid_device
;
struct
hid_field
;
struct
hid_input
;
struct
hid_usage
;
void
vivaldi_feature_mapping
(
struct
hid_device
*
hdev
,
struct
hid_field
*
field
,
struct
hid_usage
*
usage
);
int
vivaldi_input_configured
(
struct
hid_device
*
hdev
,
struct
hid_input
*
hidinput
);
extern
const
struct
attribute_group
*
vivaldi_attribute_groups
[];
#endif
/* _HID_VIVALDI_COMMON_H */
drivers/hid/hid-vivaldi.c
View file @
cb7c02e9
...
...
@@ -45,7 +45,9 @@ static struct hid_driver hid_vivaldi = {
.
id_table
=
vivaldi_table
,
.
probe
=
vivaldi_probe
,
.
feature_mapping
=
vivaldi_feature_mapping
,
.
input_configured
=
vivaldi_input_configured
,
.
driver
=
{
.
dev_groups
=
vivaldi_attribute_groups
,
},
};
module_hid_driver
(
hid_vivaldi
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment