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
nexedi
linux
Commits
e0dba55e
Commit
e0dba55e
authored
Dec 14, 2012
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: walkera0701 - switch to using pr_xxx() for messages
Signed-off-by:
Dmitry Torokhov
<
dmitry.torokhov@gmail.com
>
parent
1932c8a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
drivers/input/joystick/walkera0701.c
drivers/input/joystick/walkera0701.c
+10
-13
No files found.
drivers/input/joystick/walkera0701.c
View file @
e0dba55e
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
* the Free Software Foundation.
* the Free Software Foundation.
*/
*/
/* #define WK0701_DEBUG */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define RESERVE 20000
#define RESERVE 20000
#define SYNC_PULSE 1306000
#define SYNC_PULSE 1306000
...
@@ -67,6 +67,7 @@ static inline void walkera0701_parse_frame(struct walkera_dev *w)
...
@@ -67,6 +67,7 @@ static inline void walkera0701_parse_frame(struct walkera_dev *w)
{
{
int
i
;
int
i
;
int
val1
,
val2
,
val3
,
val4
,
val5
,
val6
,
val7
,
val8
;
int
val1
,
val2
,
val3
,
val4
,
val5
,
val6
,
val7
,
val8
;
int
magic
,
magic_bit
;
int
crc1
,
crc2
;
int
crc1
,
crc2
;
for
(
crc1
=
crc2
=
i
=
0
;
i
<
10
;
i
++
)
{
for
(
crc1
=
crc2
=
i
=
0
;
i
<
10
;
i
++
)
{
...
@@ -102,17 +103,12 @@ static inline void walkera0701_parse_frame(struct walkera_dev *w)
...
@@ -102,17 +103,12 @@ static inline void walkera0701_parse_frame(struct walkera_dev *w)
val8
=
(
w
->
buf
[
18
]
&
1
)
<<
8
|
(
w
->
buf
[
19
]
<<
4
)
|
w
->
buf
[
20
];
val8
=
(
w
->
buf
[
18
]
&
1
)
<<
8
|
(
w
->
buf
[
19
]
<<
4
)
|
w
->
buf
[
20
];
val8
*=
(
w
->
buf
[
18
]
&
2
)
-
1
;
/*sign */
val8
*=
(
w
->
buf
[
18
]
&
2
)
-
1
;
/*sign */
#ifdef WK0701_DEBUG
magic
=
(
w
->
buf
[
21
]
<<
4
)
|
w
->
buf
[
22
];
{
magic_bit
=
(
w
->
buf
[
24
]
&
8
)
>>
3
;
int
magic
,
magic_bit
;
pr_debug
(
"%4d %4d %4d %4d %4d %4d %4d %4d (magic %2x %d)
\n
"
,
magic
=
(
w
->
buf
[
21
]
<<
4
)
|
w
->
buf
[
22
];
val1
,
val2
,
val3
,
val4
,
val5
,
val6
,
val7
,
val8
,
magic_bit
=
(
w
->
buf
[
24
]
&
8
)
>>
3
;
magic
,
magic_bit
);
printk
(
KERN_DEBUG
"walkera0701: %4d %4d %4d %4d %4d %4d %4d %4d (magic %2x %d)
\n
"
,
val1
,
val2
,
val3
,
val4
,
val5
,
val6
,
val7
,
val8
,
magic
,
magic_bit
);
}
#endif
input_report_abs
(
w
->
input_dev
,
ABS_X
,
val2
);
input_report_abs
(
w
->
input_dev
,
ABS_X
,
val2
);
input_report_abs
(
w
->
input_dev
,
ABS_Y
,
val1
);
input_report_abs
(
w
->
input_dev
,
ABS_Y
,
val1
);
input_report_abs
(
w
->
input_dev
,
ABS_Z
,
val6
);
input_report_abs
(
w
->
input_dev
,
ABS_Z
,
val6
);
...
@@ -208,7 +204,8 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)
...
@@ -208,7 +204,8 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)
return
-
ENODEV
;
return
-
ENODEV
;
if
(
w
->
parport
->
irq
==
-
1
)
{
if
(
w
->
parport
->
irq
==
-
1
)
{
printk
(
KERN_ERR
"walkera0701: parport without interrupt
\n
"
);
pr_err
(
"parport %d does not have interrupt assigned
\n
"
,
parport
);
goto
init_err
;
goto
init_err
;
}
}
...
...
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