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
56141cc3
Commit
56141cc3
authored
Feb 20, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Fix ambakmi to use amba_request_regions() and the correct IRQ.
parent
90e01543
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
drivers/input/serio/ambakmi.c
drivers/input/serio/ambakmi.c
+18
-14
No files found.
drivers/input/serio/ambakmi.c
View file @
56141cc3
...
...
@@ -33,7 +33,6 @@ struct amba_kmi_port {
unsigned
int
irq
;
unsigned
int
divisor
;
unsigned
int
open
;
struct
resource
*
res
;
};
static
irqreturn_t
amba_kmi_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
...
...
@@ -97,10 +96,17 @@ static void amba_kmi_close(struct serio *io)
static
int
amba_kmi_probe
(
struct
amba_device
*
dev
,
void
*
id
)
{
struct
amba_kmi_port
*
kmi
;
int
ret
;
ret
=
amba_request_regions
(
dev
,
NULL
);
if
(
ret
)
return
ret
;
kmi
=
kmalloc
(
sizeof
(
struct
amba_kmi_port
),
GFP_KERNEL
);
if
(
!
kmi
)
return
-
ENOMEM
;
if
(
!
kmi
)
{
ret
=
-
ENOMEM
;
goto
out
;
}
memset
(
kmi
,
0
,
sizeof
(
struct
amba_kmi_port
));
...
...
@@ -112,26 +118,24 @@ static int amba_kmi_probe(struct amba_device *dev, void *id)
kmi
->
io
.
phys
=
dev
->
dev
.
bus_id
;
kmi
->
io
.
driver
=
kmi
;
kmi
->
res
=
request_mem_region
(
dev
->
res
.
start
,
KMI_SIZE
,
"kmi-pl050"
);
if
(
!
kmi
->
res
)
{
kfree
(
kmi
);
return
-
EBUSY
;
}
kmi
->
base
=
ioremap
(
dev
->
res
.
start
,
KMI_SIZE
);
if
(
!
kmi
->
base
)
{
release_resource
(
kmi
->
res
);
kfree
(
kmi
);
return
-
ENOMEM
;
ret
=
-
ENOMEM
;
goto
out
;
}
kmi
->
irq
=
dev
->
irq
;
kmi
->
irq
=
dev
->
irq
[
0
]
;
kmi
->
divisor
=
24
/
8
-
1
;
amba_set_drvdata
(
dev
,
kmi
);
serio_register_port
(
&
kmi
->
io
);
return
0
;
out:
kfree
(
kmi
);
amba_release_regions
(
dev
);
return
ret
;
}
static
int
amba_kmi_remove
(
struct
amba_device
*
dev
)
...
...
@@ -142,8 +146,8 @@ static int amba_kmi_remove(struct amba_device *dev)
serio_unregister_port
(
&
kmi
->
io
);
iounmap
(
kmi
->
base
);
release_resource
(
kmi
->
res
);
kfree
(
kmi
);
amba_release_regions
(
dev
);
return
0
;
}
...
...
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