Skip to content

Commit 0b9ec15

Browse files
rbmarlierehdeller
authored andcommitted
parisc: make parisc_bus_type const
Since commit d492cc2 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the parisc_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent cf15984 commit 0b9ec15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/parisc/include/asm/parisc-device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ parisc_get_drvdata(struct parisc_device *d)
6161
return dev_get_drvdata(&d->dev);
6262
}
6363

64-
extern struct bus_type parisc_bus_type;
64+
extern const struct bus_type parisc_bus_type;
6565

6666
int iosapic_serial_irq(struct parisc_device *dev);
6767

arch/parisc/kernel/drivers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ static struct attribute *parisc_device_attrs[] = {
618618
};
619619
ATTRIBUTE_GROUPS(parisc_device);
620620

621-
struct bus_type parisc_bus_type = {
621+
const struct bus_type parisc_bus_type = {
622622
.name = "parisc",
623623
.match = parisc_generic_match,
624624
.uevent = parisc_uevent,

0 commit comments

Comments
 (0)