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
1308c2ac
Commit
1308c2ac
authored
Aug 14, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
a1ad3d82
b0f48f7f
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
16 additions
and
52 deletions
+16
-52
drivers/base/class.c
drivers/base/class.c
+6
-0
drivers/base/core.c
drivers/base/core.c
+8
-4
drivers/base/interface.c
drivers/base/interface.c
+0
-8
drivers/base/platform.c
drivers/base/platform.c
+0
-1
drivers/block/floppy.c
drivers/block/floppy.c
+0
-3
drivers/ide/ide-probe.c
drivers/ide/ide-probe.c
+0
-3
drivers/media/video/bttv-if.c
drivers/media/video/bttv-if.c
+1
-1
drivers/pcmcia/i82365.c
drivers/pcmcia/i82365.c
+0
-3
drivers/pcmcia/tcic.c
drivers/pcmcia/tcic.c
+0
-3
drivers/pcmcia/yenta_socket.c
drivers/pcmcia/yenta_socket.c
+1
-1
drivers/scsi/scsi_debug.c
drivers/scsi/scsi_debug.c
+0
-2
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_scan.c
+0
-20
drivers/scsi/scsi_sysfs.c
drivers/scsi/scsi_sysfs.c
+0
-2
include/linux/device.h
include/linux/device.h
+0
-1
No files found.
drivers/base/class.c
View file @
1308c2ac
...
@@ -194,6 +194,12 @@ static void class_dev_release(struct kobject * kobj)
...
@@ -194,6 +194,12 @@ static void class_dev_release(struct kobject * kobj)
if
(
cls
->
release
)
if
(
cls
->
release
)
cls
->
release
(
cd
);
cls
->
release
(
cd
);
else
{
printk
(
KERN_ERR
"Device class '%s' does not have a release() function, "
"it is broken and must be fixed.
\n
"
,
cd
->
class_id
);
WARN_ON
(
1
);
}
}
}
static
struct
kobj_type
ktype_class_device
=
{
static
struct
kobj_type
ktype_class_device
=
{
...
...
drivers/base/core.c
View file @
1308c2ac
...
@@ -78,6 +78,12 @@ static void device_release(struct kobject * kobj)
...
@@ -78,6 +78,12 @@ static void device_release(struct kobject * kobj)
struct
device
*
dev
=
to_dev
(
kobj
);
struct
device
*
dev
=
to_dev
(
kobj
);
if
(
dev
->
release
)
if
(
dev
->
release
)
dev
->
release
(
dev
);
dev
->
release
(
dev
);
else
{
printk
(
KERN_ERR
"Device '%s' does not have a release() function, "
"it is broken and must be fixed.
\n
"
,
dev
->
bus_id
);
WARN_ON
(
1
);
}
}
}
static
struct
kobj_type
ktype_device
=
{
static
struct
kobj_type
ktype_device
=
{
...
@@ -211,8 +217,7 @@ int device_add(struct device *dev)
...
@@ -211,8 +217,7 @@ int device_add(struct device *dev)
parent
=
get_device
(
dev
->
parent
);
parent
=
get_device
(
dev
->
parent
);
pr_debug
(
"DEV: registering device: ID = '%s', name = %s
\n
"
,
pr_debug
(
"DEV: registering device: ID = '%s'
\n
"
,
dev
->
bus_id
);
dev
->
bus_id
,
dev
->
name
);
/* first, register with generic layer. */
/* first, register with generic layer. */
strlcpy
(
dev
->
kobj
.
name
,
dev
->
bus_id
,
KOBJ_NAME_LEN
);
strlcpy
(
dev
->
kobj
.
name
,
dev
->
bus_id
,
KOBJ_NAME_LEN
);
...
@@ -342,8 +347,7 @@ void device_del(struct device * dev)
...
@@ -342,8 +347,7 @@ void device_del(struct device * dev)
*/
*/
void
device_unregister
(
struct
device
*
dev
)
void
device_unregister
(
struct
device
*
dev
)
{
{
pr_debug
(
"DEV: Unregistering device. ID = '%s', name = '%s'
\n
"
,
pr_debug
(
"DEV: Unregistering device. ID = '%s'
\n
"
,
dev
->
bus_id
);
dev
->
bus_id
,
dev
->
name
);
device_del
(
dev
);
device_del
(
dev
);
put_device
(
dev
);
put_device
(
dev
);
}
}
...
...
drivers/base/interface.c
View file @
1308c2ac
...
@@ -14,13 +14,6 @@
...
@@ -14,13 +14,6 @@
#include <linux/stat.h>
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/string.h>
static
ssize_t
device_read_name
(
struct
device
*
dev
,
char
*
buf
)
{
return
sprintf
(
buf
,
"%s
\n
"
,
dev
->
name
);
}
static
DEVICE_ATTR
(
name
,
S_IRUGO
,
device_read_name
,
NULL
);
/**
/**
* detach_state - control the default power state for the device.
* detach_state - control the default power state for the device.
*
*
...
@@ -53,7 +46,6 @@ static DEVICE_ATTR(detach_state,0644,detach_show,detach_store);
...
@@ -53,7 +46,6 @@ static DEVICE_ATTR(detach_state,0644,detach_show,detach_store);
struct
attribute
*
dev_default_attrs
[]
=
{
struct
attribute
*
dev_default_attrs
[]
=
{
&
dev_attr_name
.
attr
,
&
dev_attr_detach_state
.
attr
,
&
dev_attr_detach_state
.
attr
,
NULL
,
NULL
,
};
};
drivers/base/platform.c
View file @
1308c2ac
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
#include <linux/init.h>
#include <linux/init.h>
struct
device
legacy_bus
=
{
struct
device
legacy_bus
=
{
.
name
=
"legacy bus"
,
.
bus_id
=
"legacy"
,
.
bus_id
=
"legacy"
,
};
};
...
...
drivers/block/floppy.c
View file @
1308c2ac
...
@@ -4232,9 +4232,6 @@ static int have_no_fdc= -ENODEV;
...
@@ -4232,9 +4232,6 @@ static int have_no_fdc= -ENODEV;
static
struct
platform_device
floppy_device
=
{
static
struct
platform_device
floppy_device
=
{
.
name
=
"floppy"
,
.
name
=
"floppy"
,
.
id
=
0
,
.
id
=
0
,
.
dev
=
{
.
name
=
"Floppy Drive"
,
},
};
};
static
struct
kobject
*
floppy_find
(
dev_t
dev
,
int
*
part
,
void
*
data
)
static
struct
kobject
*
floppy_find
(
dev_t
dev
,
int
*
part
,
void
*
data
)
...
...
drivers/ide/ide-probe.c
View file @
1308c2ac
...
@@ -648,7 +648,6 @@ static void hwif_register (ide_hwif_t *hwif)
...
@@ -648,7 +648,6 @@ static void hwif_register (ide_hwif_t *hwif)
{
{
/* register with global device tree */
/* register with global device tree */
strlcpy
(
hwif
->
gendev
.
bus_id
,
hwif
->
name
,
BUS_ID_SIZE
);
strlcpy
(
hwif
->
gendev
.
bus_id
,
hwif
->
name
,
BUS_ID_SIZE
);
snprintf
(
hwif
->
gendev
.
name
,
DEVICE_NAME_SIZE
,
"IDE Controller"
);
hwif
->
gendev
.
driver_data
=
hwif
;
hwif
->
gendev
.
driver_data
=
hwif
;
if
(
hwif
->
pci_dev
)
if
(
hwif
->
pci_dev
)
hwif
->
gendev
.
parent
=
&
hwif
->
pci_dev
->
dev
;
hwif
->
gendev
.
parent
=
&
hwif
->
pci_dev
->
dev
;
...
@@ -1217,8 +1216,6 @@ static void init_gendisk (ide_hwif_t *hwif)
...
@@ -1217,8 +1216,6 @@ static void init_gendisk (ide_hwif_t *hwif)
ide_add_generic_settings
(
drive
);
ide_add_generic_settings
(
drive
);
snprintf
(
drive
->
gendev
.
bus_id
,
BUS_ID_SIZE
,
"%u.%u"
,
snprintf
(
drive
->
gendev
.
bus_id
,
BUS_ID_SIZE
,
"%u.%u"
,
hwif
->
index
,
unit
);
hwif
->
index
,
unit
);
snprintf
(
drive
->
gendev
.
name
,
DEVICE_NAME_SIZE
,
"%s"
,
"IDE Drive"
);
drive
->
gendev
.
parent
=
&
hwif
->
gendev
;
drive
->
gendev
.
parent
=
&
hwif
->
gendev
;
drive
->
gendev
.
bus
=
&
ide_bus_type
;
drive
->
gendev
.
bus
=
&
ide_bus_type
;
drive
->
gendev
.
driver_data
=
drive
;
drive
->
gendev
.
driver_data
=
drive
;
...
...
drivers/media/video/bttv-if.c
View file @
1308c2ac
...
@@ -315,7 +315,7 @@ int __devinit init_bttv_i2c(struct bttv *btv)
...
@@ -315,7 +315,7 @@ int __devinit init_bttv_i2c(struct bttv *btv)
memcpy
(
&
btv
->
i2c_client
,
&
bttv_i2c_client_template
,
memcpy
(
&
btv
->
i2c_client
,
&
bttv_i2c_client_template
,
sizeof
(
struct
i2c_client
));
sizeof
(
struct
i2c_client
));
sprintf
(
btv
->
i2c_adap
.
dev
.
name
,
"bt848 #%d"
,
btv
->
nr
);
sprintf
(
btv
->
i2c_adap
.
name
,
"bt848 #%d"
,
btv
->
nr
);
btv
->
i2c_adap
.
dev
.
parent
=
&
btv
->
dev
->
dev
;
btv
->
i2c_adap
.
dev
.
parent
=
&
btv
->
dev
->
dev
;
btv
->
i2c_algo
.
data
=
btv
;
btv
->
i2c_algo
.
data
=
btv
;
...
...
drivers/pcmcia/i82365.c
View file @
1308c2ac
...
@@ -1361,9 +1361,6 @@ static struct device_driver i82365_driver = {
...
@@ -1361,9 +1361,6 @@ static struct device_driver i82365_driver = {
static
struct
platform_device
i82365_device
=
{
static
struct
platform_device
i82365_device
=
{
.
name
=
"i82365"
,
.
name
=
"i82365"
,
.
id
=
0
,
.
id
=
0
,
.
dev
=
{
.
name
=
"i82365"
,
},
};
};
static
int
__init
init_i82365
(
void
)
static
int
__init
init_i82365
(
void
)
...
...
drivers/pcmcia/tcic.c
View file @
1308c2ac
...
@@ -372,9 +372,6 @@ static struct device_driver tcic_driver = {
...
@@ -372,9 +372,6 @@ static struct device_driver tcic_driver = {
static
struct
platform_device
tcic_device
=
{
static
struct
platform_device
tcic_device
=
{
.
name
=
"tcic-pcmcia"
,
.
name
=
"tcic-pcmcia"
,
.
id
=
0
,
.
id
=
0
,
.
dev
=
{
.
name
=
"tcic-pcmcia"
,
},
};
};
...
...
drivers/pcmcia/yenta_socket.c
View file @
1308c2ac
...
@@ -899,7 +899,7 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
...
@@ -899,7 +899,7 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
/* We must finish initialization here */
/* We must finish initialization here */
if
(
!
socket
->
cb_irq
||
request_irq
(
socket
->
cb_irq
,
yenta_interrupt
,
SA_SHIRQ
,
socket
->
dev
->
dev
.
name
,
socket
))
{
if
(
!
socket
->
cb_irq
||
request_irq
(
socket
->
cb_irq
,
yenta_interrupt
,
SA_SHIRQ
,
pci_name
(
socket
->
dev
)
,
socket
))
{
/* No IRQ or request_irq failed. Poll */
/* No IRQ or request_irq failed. Poll */
socket
->
cb_irq
=
0
;
/* But zero is a valid IRQ number. */
socket
->
cb_irq
=
0
;
/* But zero is a valid IRQ number. */
init_timer
(
&
socket
->
poll_timer
);
init_timer
(
&
socket
->
poll_timer
);
...
...
drivers/scsi/scsi_debug.c
View file @
1308c2ac
...
@@ -1566,7 +1566,6 @@ device_initcall(scsi_debug_init);
...
@@ -1566,7 +1566,6 @@ device_initcall(scsi_debug_init);
module_exit
(
scsi_debug_exit
);
module_exit
(
scsi_debug_exit
);
static
struct
device
pseudo_primary
=
{
static
struct
device
pseudo_primary
=
{
.
name
=
"Host/Pseudo Bridge"
,
.
bus_id
=
"pseudo_0"
,
.
bus_id
=
"pseudo_0"
,
};
};
...
@@ -1630,7 +1629,6 @@ static int sdebug_add_adapter()
...
@@ -1630,7 +1629,6 @@ static int sdebug_add_adapter()
sdbg_host
->
dev
.
bus
=
&
pseudo_lld_bus
;
sdbg_host
->
dev
.
bus
=
&
pseudo_lld_bus
;
sdbg_host
->
dev
.
parent
=
&
pseudo_primary
;
sdbg_host
->
dev
.
parent
=
&
pseudo_primary
;
sdbg_host
->
dev
.
release
=
&
sdebug_release_adapter
;
sdbg_host
->
dev
.
release
=
&
sdebug_release_adapter
;
sprintf
(
sdbg_host
->
dev
.
name
,
"scsi debug adapter"
);
sprintf
(
sdbg_host
->
dev
.
bus_id
,
"adapter%d"
,
scsi_debug_add_host
);
sprintf
(
sdbg_host
->
dev
.
bus_id
,
"adapter%d"
,
scsi_debug_add_host
);
error
=
device_register
(
&
sdbg_host
->
dev
);
error
=
device_register
(
&
sdbg_host
->
dev
);
...
...
drivers/scsi/scsi_scan.c
View file @
1308c2ac
...
@@ -447,24 +447,6 @@ static void scsi_probe_lun(struct scsi_request *sreq, char *inq_result,
...
@@ -447,24 +447,6 @@ static void scsi_probe_lun(struct scsi_request *sreq, char *inq_result,
return
;
return
;
}
}
static
void
scsi_set_name
(
struct
scsi_device
*
sdev
,
char
*
inq_result
)
{
int
i
;
char
type
[
72
];
i
=
inq_result
[
0
]
&
0x1f
;
if
(
i
<
MAX_SCSI_DEVICE_CODE
)
strcpy
(
type
,
scsi_device_types
[
i
]);
else
strcpy
(
type
,
"Unknown"
);
i
=
strlen
(
type
)
-
1
;
while
(
i
>=
0
&&
type
[
i
]
==
' '
)
type
[
i
--
]
=
'\0'
;
snprintf
(
sdev
->
sdev_gendev
.
name
,
DEVICE_NAME_SIZE
,
"SCSI %s"
,
type
);
}
/**
/**
* scsi_add_lun - allocate and fully initialze a Scsi_Device
* scsi_add_lun - allocate and fully initialze a Scsi_Device
* @sdevscan: holds information to be stored in the new Scsi_Device
* @sdevscan: holds information to be stored in the new Scsi_Device
...
@@ -539,8 +521,6 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
...
@@ -539,8 +521,6 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
printk
(
KERN_INFO
"scsi: unknown device type %d
\n
"
,
sdev
->
type
);
printk
(
KERN_INFO
"scsi: unknown device type %d
\n
"
,
sdev
->
type
);
}
}
scsi_set_name
(
sdev
,
inq_result
);
print_inquiry
(
inq_result
);
print_inquiry
(
inq_result
);
/*
/*
...
...
drivers/scsi/scsi_sysfs.c
View file @
1308c2ac
...
@@ -408,8 +408,6 @@ void scsi_sysfs_init_host(struct Scsi_Host *shost)
...
@@ -408,8 +408,6 @@ void scsi_sysfs_init_host(struct Scsi_Host *shost)
device_initialize
(
&
shost
->
shost_gendev
);
device_initialize
(
&
shost
->
shost_gendev
);
snprintf
(
shost
->
shost_gendev
.
bus_id
,
BUS_ID_SIZE
,
"host%d"
,
snprintf
(
shost
->
shost_gendev
.
bus_id
,
BUS_ID_SIZE
,
"host%d"
,
shost
->
host_no
);
shost
->
host_no
);
snprintf
(
shost
->
shost_gendev
.
name
,
DEVICE_NAME_SIZE
,
"%s"
,
shost
->
hostt
->
proc_name
);
shost
->
shost_gendev
.
release
=
scsi_host_dev_release
;
shost
->
shost_gendev
.
release
=
scsi_host_dev_release
;
class_device_initialize
(
&
shost
->
shost_classdev
);
class_device_initialize
(
&
shost
->
shost_classdev
);
...
...
include/linux/device.h
View file @
1308c2ac
...
@@ -254,7 +254,6 @@ struct device {
...
@@ -254,7 +254,6 @@ struct device {
struct
device
*
parent
;
struct
device
*
parent
;
struct
kobject
kobj
;
struct
kobject
kobj
;
char
name
[
DEVICE_NAME_SIZE
];
/* descriptive ascii string */
char
bus_id
[
BUS_ID_SIZE
];
/* position on parent bus */
char
bus_id
[
BUS_ID_SIZE
];
/* position on parent bus */
struct
bus_type
*
bus
;
/* type of bus device is on */
struct
bus_type
*
bus
;
/* type of bus device is on */
...
...
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