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
nexedi
linux
Commits
3a245026
Commit
3a245026
authored
Aug 13, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use C99 initializers in driver model core
parent
d572f1a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
19 deletions
+18
-19
drivers/base/core.c
drivers/base/core.c
+2
-2
drivers/base/fs/bus.c
drivers/base/fs/bus.c
+6
-6
drivers/base/fs/device.c
drivers/base/fs/device.c
+4
-5
drivers/base/fs/driver.c
drivers/base/fs/driver.c
+4
-4
drivers/base/sys.c
drivers/base/sys.c
+2
-2
No files found.
drivers/base/core.c
View file @
3a245026
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
#include "base.h"
#include "base.h"
struct
device
device_root
=
{
struct
device
device_root
=
{
bus_id:
"root"
,
.
bus_id
=
"root"
,
name:
"System root"
,
.
name
=
"System root"
,
};
};
int
(
*
platform_notify
)(
struct
device
*
dev
)
=
NULL
;
int
(
*
platform_notify
)(
struct
device
*
dev
)
=
NULL
;
...
...
drivers/base/fs/bus.c
View file @
3a245026
...
@@ -56,10 +56,10 @@ bus_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
...
@@ -56,10 +56,10 @@ bus_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
}
}
static
struct
driverfs_ops
bus_attr_ops
=
{
static
struct
driverfs_ops
bus_attr_ops
=
{
open:
bus_attr_open
,
.
open
=
bus_attr_open
,
close:
bus_attr_close
,
.
close
=
bus_attr_close
,
show:
bus_attr_show
,
.
show
=
bus_attr_show
,
store:
bus_attr_store
,
.
store
=
bus_attr_store
,
};
};
int
bus_create_file
(
struct
bus_type
*
bus
,
struct
bus_attribute
*
attr
)
int
bus_create_file
(
struct
bus_type
*
bus
,
struct
bus_attribute
*
attr
)
...
@@ -107,8 +107,8 @@ void bus_remove_dir(struct bus_type * bus)
...
@@ -107,8 +107,8 @@ void bus_remove_dir(struct bus_type * bus)
}
}
static
struct
driver_dir_entry
bus_dir
=
{
static
struct
driver_dir_entry
bus_dir
=
{
name:
"bus"
,
.
name
=
"bus"
,
mode:
(
S_IFDIR
|
S_IRWXU
|
S_IRUGO
|
S_IXUGO
),
.
mode
=
(
S_IFDIR
|
S_IRWXU
|
S_IRUGO
|
S_IXUGO
),
};
};
static
int
__init
bus_init
(
void
)
static
int
__init
bus_init
(
void
)
...
...
drivers/base/fs/device.c
View file @
3a245026
...
@@ -67,10 +67,10 @@ dev_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
...
@@ -67,10 +67,10 @@ dev_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
}
}
static
struct
driverfs_ops
dev_attr_ops
=
{
static
struct
driverfs_ops
dev_attr_ops
=
{
open:
dev_attr_open
,
.
open
=
dev_attr_open
,
close:
dev_attr_close
,
.
close
=
dev_attr_close
,
show:
dev_attr_show
,
.
show
=
dev_attr_show
,
store:
dev_attr_store
,
.
store
=
dev_attr_store
,
};
};
/**
/**
...
@@ -231,4 +231,3 @@ int device_make_dir(struct device * dev)
...
@@ -231,4 +231,3 @@ int device_make_dir(struct device * dev)
EXPORT_SYMBOL
(
device_create_file
);
EXPORT_SYMBOL
(
device_create_file
);
EXPORT_SYMBOL
(
device_remove_file
);
EXPORT_SYMBOL
(
device_remove_file
);
drivers/base/fs/driver.c
View file @
3a245026
...
@@ -54,10 +54,10 @@ drv_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
...
@@ -54,10 +54,10 @@ drv_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
}
}
static
struct
driverfs_ops
drv_attr_ops
=
{
static
struct
driverfs_ops
drv_attr_ops
=
{
open:
drv_attr_open
,
.
open
=
drv_attr_open
,
close:
drv_attr_close
,
.
close
=
drv_attr_close
,
show:
drv_attr_show
,
.
show
=
drv_attr_show
,
store:
drv_attr_store
,
.
store
=
drv_attr_store
,
};
};
int
driver_create_file
(
struct
device_driver
*
drv
,
struct
driver_attribute
*
attr
)
int
driver_create_file
(
struct
device_driver
*
drv
,
struct
driver_attribute
*
attr
)
...
...
drivers/base/sys.c
View file @
3a245026
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
#include <linux/errno.h>
#include <linux/errno.h>
static
struct
device
system_bus
=
{
static
struct
device
system_bus
=
{
name:
"System Bus"
,
.
name
=
"System Bus"
,
bus_id:
"sys"
,
.
bus_id
=
"sys"
,
};
};
int
register_sys_device
(
struct
device
*
dev
)
int
register_sys_device
(
struct
device
*
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