Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
59a2e980
Commit
59a2e980
authored
Aug 15, 2005
by
Tony Lindgren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: OMAP: Fixed device_attribute for gpio-switch
Fixed device_attribute for gpio-switch
parent
28bcc5c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
arch/arm/plat-omap/gpio-switch.c
arch/arm/plat-omap/gpio-switch.c
+7
-2
No files found.
arch/arm/plat-omap/gpio-switch.c
View file @
59a2e980
...
@@ -80,7 +80,10 @@ static int gpio_sw_get_state(struct gpio_switch *sw)
...
@@ -80,7 +80,10 @@ static int gpio_sw_get_state(struct gpio_switch *sw)
return
state
;
return
state
;
}
}
static
ssize_t
gpio_sw_store
(
struct
device
*
dev
,
const
char
*
buf
,
size_t
count
)
static
ssize_t
gpio_sw_store
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
count
)
{
{
struct
gpio_switch
*
sw
=
dev_get_drvdata
(
dev
);
struct
gpio_switch
*
sw
=
dev_get_drvdata
(
dev
);
int
enable
=
(
int
)
simple_strtoul
(
buf
,
NULL
,
10
);
int
enable
=
(
int
)
simple_strtoul
(
buf
,
NULL
,
10
);
...
@@ -89,7 +92,9 @@ static ssize_t gpio_sw_store(struct device *dev, const char *buf, size_t count)
...
@@ -89,7 +92,9 @@ static ssize_t gpio_sw_store(struct device *dev, const char *buf, size_t count)
}
}
#define gpio_sw_switch_attr(name) \
#define gpio_sw_switch_attr(name) \
static ssize_t gpio_sw_show_##name(struct device *dev, char *buf) \
static ssize_t gpio_sw_show_##name(struct device *dev, \
struct device_attribute *attr, \
char *buf) \
{ \
{ \
struct gpio_switch *sw = dev_get_drvdata(dev); \
struct gpio_switch *sw = dev_get_drvdata(dev); \
return sprintf(buf, "%s\n", name##_str[gpio_sw_get_state(sw)]); \
return sprintf(buf, "%s\n", name##_str[gpio_sw_get_state(sw)]); \
...
...
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