Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FPGA Configuration Space
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FPGA Configuration Space
Commits
b77f9633
Commit
b77f9633
authored
Feb 17, 2012
by
Manohar Vanga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
driver: fix checkpatch warnings and clean up Makefile
Signed-off-by:
Manohar Vanga
<
manohar.vanga@cern.ch
>
parent
20ba84f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
Makefile
driver/Makefile
+1
-1
fake_wb_bus.c
driver/fake_wb_bus.c
+1
-1
wishbone.c
driver/wishbone.c
+5
-5
No files found.
driver/Makefile
View file @
b77f9633
...
@@ -5,7 +5,7 @@ LINUX?=/acc/sys/$(CPU)/usr/src/kernels/$(KVER)
...
@@ -5,7 +5,7 @@ LINUX?=/acc/sys/$(CPU)/usr/src/kernels/$(KVER)
# temporarily, use local <linux/wishbone.h>
# temporarily, use local <linux/wishbone.h>
EXTRA_CFLAGS
:=
-I
$(obj)
/include
-I
$(
shell
/bin/pwd
)
/drivers/w1/
EXTRA_CFLAGS
:=
-I
$(obj)
/include
-I
$(
shell
/bin/pwd
)
/drivers/w1/
obj-m
=
wishbone.o fakedac.o fakeadc.o fake_wb_bus.o wb_
onewire.o wb_
1wire.o
obj-m
=
wishbone.o fakedac.o fakeadc.o fake_wb_bus.o wb_1wire.o
all
:
all
:
make
-C
$(LINUX)
M
=
$(
shell
/bin/pwd
)
modules
make
-C
$(LINUX)
M
=
$(
shell
/bin/pwd
)
modules
...
...
driver/fake_wb_bus.c
View file @
b77f9633
...
@@ -95,7 +95,7 @@ static void fake_wbbus_release(struct device *dev)
...
@@ -95,7 +95,7 @@ static void fake_wbbus_release(struct device *dev)
}
}
static
struct
device
fake_wbbus_device
=
{
static
struct
device
fake_wbbus_device
=
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,
6,
29)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,
6,
29)
.
bus_id
=
"fake-wbbus0"
,
.
bus_id
=
"fake-wbbus0"
,
#else
#else
.
init_name
=
"fake-wbbus0"
,
.
init_name
=
"fake-wbbus0"
,
...
...
driver/wishbone.c
View file @
b77f9633
...
@@ -41,7 +41,7 @@ static void wb_zero_release(struct device *dev)
...
@@ -41,7 +41,7 @@ static void wb_zero_release(struct device *dev)
}
}
static
struct
device
wb_dev_zero
=
{
static
struct
device
wb_dev_zero
=
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,
6,
29)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,
6,
29)
.
bus_id
=
"wb0"
,
.
bus_id
=
"wb0"
,
#else
#else
.
init_name
=
"wb0"
,
.
init_name
=
"wb0"
,
...
@@ -87,7 +87,7 @@ int wb_register_device(struct wb_device *wbdev)
...
@@ -87,7 +87,7 @@ int wb_register_device(struct wb_device *wbdev)
wbdev
->
dev
.
bus
=
&
wb_bus_type
;
wbdev
->
dev
.
bus
=
&
wb_bus_type
;
wbdev
->
dev
.
parent
=
&
wbdev
->
bus
->
dev
;
wbdev
->
dev
.
parent
=
&
wbdev
->
bus
->
dev
;
wbdev
->
dev
.
release
=
wb_dev_release
;
wbdev
->
dev
.
release
=
wb_dev_release
;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,
6,
29)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,
6,
29)
snprintf
(
wbdev
->
dev
.
bus_id
,
BUS_ID_SIZE
,
"wb%d-%s-%s"
,
devno
,
snprintf
(
wbdev
->
dev
.
bus_id
,
BUS_ID_SIZE
,
"wb%d-%s-%s"
,
devno
,
wbdev
->
wbd
.
vendor_name
,
wbdev
->
wbd
.
device_name
);
wbdev
->
wbd
.
vendor_name
,
wbdev
->
wbd
.
device_name
);
#else
#else
...
@@ -142,7 +142,7 @@ static struct wb_device *wb_get_next_device(struct wb_bus *bus, wb_addr_t wb_ptr
...
@@ -142,7 +142,7 @@ static struct wb_device *wb_get_next_device(struct wb_bus *bus, wb_addr_t wb_ptr
wb_read_cfg
(
bus
,
wb_ptr
,
(
void
*
)
&
wbd
,
wb_read_cfg
(
bus
,
wb_ptr
,
(
void
*
)
&
wbd
,
sizeof
(
struct
sdwb_wbd
));
sizeof
(
struct
sdwb_wbd
));
if
(
wbd
.
wbd_magic
!=
SDWB_WBD_MAGIC
)
if
(
wbd
.
wbd_magic
!=
SDWB_WBD_MAGIC
)
return
NULL
;
return
NULL
;
wbd
.
hdl_base
=
be64_to_cpu
(
wbd
.
hdl_base
);
wbd
.
hdl_base
=
be64_to_cpu
(
wbd
.
hdl_base
);
...
@@ -222,7 +222,7 @@ int wb_scan_bus(struct wb_bus *bus)
...
@@ -222,7 +222,7 @@ int wb_scan_bus(struct wb_bus *bus)
pr_info
(
KBUILD_MODNAME
pr_info
(
KBUILD_MODNAME
": found %d wishbone devices on wishbone bus %s
\n
"
,
": found %d wishbone devices on wishbone bus %s
\n
"
,
bus
->
ndev
,
bus
->
name
);
bus
->
ndev
,
bus
->
name
);
return
0
;
return
0
;
err_wbdev_register:
err_wbdev_register:
...
@@ -253,7 +253,7 @@ int wb_register_bus(struct wb_bus *bus)
...
@@ -253,7 +253,7 @@ int wb_register_bus(struct wb_bus *bus)
bus
->
dev
.
bus
=
&
wb_bus_type
;
bus
->
dev
.
bus
=
&
wb_bus_type
;
bus
->
dev
.
parent
=
&
wb_dev_zero
;
bus
->
dev
.
parent
=
&
wb_dev_zero
;
bus
->
dev
.
release
=
wb_bus_release
;
bus
->
dev
.
release
=
wb_bus_release
;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,
6,
29)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,
6,
29)
snprintf
(
bus
->
dev
.
bus_id
,
BUS_ID_SIZE
,
"wb-bus%d-%s"
,
devno
,
snprintf
(
bus
->
dev
.
bus_id
,
BUS_ID_SIZE
,
"wb-bus%d-%s"
,
devno
,
bus
->
name
);
bus
->
name
);
#else
#else
...
...
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