Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
55bf39e9
Commit
55bf39e9
authored
13 years ago
by
John Crispin
Browse files
Options
Downloads
Patches
Plain Diff
fixes gpio_export patch
SVN-Revision: 30521
parent
b0a11ba9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
target/linux/lantiq/patches/205-owrt-gpio-export.patch
+8
-8
8 additions, 8 deletions
target/linux/lantiq/patches/205-owrt-gpio-export.patch
with
8 additions
and
8 deletions
target/linux/lantiq/patches/205-owrt-gpio-export.patch
+
8
−
8
View file @
55bf39e9
--- a/drivers/gpio/gpiolib.c
Index: linux-3.1.10/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
===================================================================
@@ -64,9 +64,9 @@
struct gpio_desc {
--- linux-3.1.10.orig/drivers/gpio/gpiolib.c 2012-01-18 16:33:18.000000000 +0100
+++ linux-3.1.10/drivers/gpio/gpiolib.c 2012-02-03 20:22:42.554529747 +0100
@@ -64,9 +64,9 @@
#define GPIO_FLAGS_MASK ((1 << ID_SHIFT) - 1)
#define GPIO_FLAGS_MASK ((1 << ID_SHIFT) - 1)
#define GPIO_TRIGGER_MASK (BIT(FLAG_TRIG_FALL) | BIT(FLAG_TRIG_RISE))
#define GPIO_TRIGGER_MASK (BIT(FLAG_TRIG_FALL) | BIT(FLAG_TRIG_RISE))
...
@@ -12,7 +14,7 @@
...
@@ -12,7 +14,7 @@
};
};
static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
@@ -76,9 +76,9 @@
static DEFINE_IDR(dirent_idr);
@@ -76,9 +76,9 @@
static inline void desc_set_label(struct gpio_desc *d, const char *label)
static inline void desc_set_label(struct gpio_desc *d, const char *label)
{
{
...
@@ -24,17 +26,15 @@
...
@@ -24,17 +26,15 @@
}
}
/* Warn when drivers omit gpio_request() calls -- legal but ill-advised
/* Warn when drivers omit gpio_request() calls -- legal but ill-advised
@@ -727,7 +727,
8
@@
int gpio_export(unsigned gpio, bool dire
@@ -727,7 +727,
6
@@
if (desc->chip->names && desc->chip->names[gpio - desc->chip->base])
if (desc->chip->names && desc->chip->names[gpio - desc->chip->base])
ioname = desc->chip->names[gpio - desc->chip->base];
ioname = desc->chip->names[gpio - desc->chip->base];
-
-
+ else
+ ioname = gpio_desc[gpio].label;
if (status == 0) {
if (status == 0) {
struct device *dev;
struct device *dev;
@@ -1347,11 +134
8
,11 @@
const char *gpiochip_is_requested(struct
@@ -1347,11 +134
6
,11 @@
return NULL;
return NULL;
if (test_bit(FLAG_REQUESTED, &gpio_desc[gpio].flags) == 0)
if (test_bit(FLAG_REQUESTED, &gpio_desc[gpio].flags) == 0)
return NULL;
return NULL;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment