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
2976f247
Commit
2976f247
authored
Jul 29, 2012
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: gpio-keys-polled - constify pointers to platform data
Signed-off-by:
Dmitry Torokhov
<
dmitry.torokhov@gmail.com
>
parent
41091ad0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
drivers/input/keyboard/gpio_keys_polled.c
drivers/input/keyboard/gpio_keys_polled.c
+7
-7
No files found.
drivers/input/keyboard/gpio_keys_polled.c
View file @
2976f247
...
...
@@ -38,7 +38,7 @@ struct gpio_keys_button_data {
struct
gpio_keys_polled_dev
{
struct
input_polled_dev
*
poll_dev
;
struct
device
*
dev
;
struct
gpio_keys_platform_data
*
pdata
;
const
struct
gpio_keys_platform_data
*
pdata
;
struct
gpio_keys_button_data
data
[
0
];
};
...
...
@@ -67,11 +67,11 @@ static void gpio_keys_polled_check_state(struct input_dev *input,
static
void
gpio_keys_polled_poll
(
struct
input_polled_dev
*
dev
)
{
struct
gpio_keys_polled_dev
*
bdev
=
dev
->
private
;
struct
gpio_keys_platform_data
*
pdata
=
bdev
->
pdata
;
const
struct
gpio_keys_platform_data
*
pdata
=
bdev
->
pdata
;
struct
input_dev
*
input
=
dev
->
input
;
int
i
;
for
(
i
=
0
;
i
<
bdev
->
pdata
->
nbuttons
;
i
++
)
{
for
(
i
=
0
;
i
<
pdata
->
nbuttons
;
i
++
)
{
struct
gpio_keys_button_data
*
bdata
=
&
bdev
->
data
[
i
];
if
(
bdata
->
count
<
bdata
->
threshold
)
...
...
@@ -85,7 +85,7 @@ static void gpio_keys_polled_poll(struct input_polled_dev *dev)
static
void
gpio_keys_polled_open
(
struct
input_polled_dev
*
dev
)
{
struct
gpio_keys_polled_dev
*
bdev
=
dev
->
private
;
struct
gpio_keys_platform_data
*
pdata
=
bdev
->
pdata
;
const
struct
gpio_keys_platform_data
*
pdata
=
bdev
->
pdata
;
if
(
pdata
->
enable
)
pdata
->
enable
(
bdev
->
dev
);
...
...
@@ -94,7 +94,7 @@ static void gpio_keys_polled_open(struct input_polled_dev *dev)
static
void
gpio_keys_polled_close
(
struct
input_polled_dev
*
dev
)
{
struct
gpio_keys_polled_dev
*
bdev
=
dev
->
private
;
struct
gpio_keys_platform_data
*
pdata
=
bdev
->
pdata
;
const
struct
gpio_keys_platform_data
*
pdata
=
bdev
->
pdata
;
if
(
pdata
->
disable
)
pdata
->
disable
(
bdev
->
dev
);
...
...
@@ -102,8 +102,8 @@ static void gpio_keys_polled_close(struct input_polled_dev *dev)
static
int
__devinit
gpio_keys_polled_probe
(
struct
platform_device
*
pdev
)
{
struct
gpio_keys_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
device
*
dev
=
&
pdev
->
dev
;
const
struct
gpio_keys_platform_data
*
pdata
=
dev_get_platdata
(
dev
);
struct
gpio_keys_polled_dev
*
bdev
;
struct
input_polled_dev
*
poll_dev
;
struct
input_dev
*
input
;
...
...
@@ -217,7 +217,7 @@ static int __devinit gpio_keys_polled_probe(struct platform_device *pdev)
static
int
__devexit
gpio_keys_polled_remove
(
struct
platform_device
*
pdev
)
{
struct
gpio_keys_polled_dev
*
bdev
=
platform_get_drvdata
(
pdev
);
struct
gpio_keys_platform_data
*
pdata
=
bdev
->
pdata
;
const
struct
gpio_keys_platform_data
*
pdata
=
bdev
->
pdata
;
int
i
;
input_unregister_polled_device
(
bdev
->
poll_dev
);
...
...
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