[POWERPC] iseries: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. iseries platform changes. Built for iseries_defconfig Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Родитель
954a46e2d5
Коммит
c4c7cba90c
|
@ -179,7 +179,7 @@ void iommu_devnode_init_iSeries(struct device_node *dn)
|
||||||
{
|
{
|
||||||
struct iommu_table *tbl;
|
struct iommu_table *tbl;
|
||||||
struct pci_dn *pdn = PCI_DN(dn);
|
struct pci_dn *pdn = PCI_DN(dn);
|
||||||
u32 *lsn = (u32 *)get_property(dn, "linux,logical-slot-number", NULL);
|
const u32 *lsn = get_property(dn, "linux,logical-slot-number", NULL);
|
||||||
|
|
||||||
BUG_ON(lsn == NULL);
|
BUG_ON(lsn == NULL);
|
||||||
|
|
||||||
|
|
|
@ -176,12 +176,12 @@ void iSeries_pcibios_init(void)
|
||||||
}
|
}
|
||||||
while ((node = of_get_next_child(root, node)) != NULL) {
|
while ((node = of_get_next_child(root, node)) != NULL) {
|
||||||
HvBusNumber bus;
|
HvBusNumber bus;
|
||||||
u32 *busp;
|
const u32 *busp;
|
||||||
|
|
||||||
if ((node->type == NULL) || (strcmp(node->type, "pci") != 0))
|
if ((node->type == NULL) || (strcmp(node->type, "pci") != 0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
busp = (u32 *)get_property(node, "bus-range", NULL);
|
busp = get_property(node, "bus-range", NULL);
|
||||||
if (busp == NULL)
|
if (busp == NULL)
|
||||||
continue;
|
continue;
|
||||||
bus = *busp;
|
bus = *busp;
|
||||||
|
@ -221,10 +221,9 @@ void __init iSeries_pci_final_fixup(void)
|
||||||
|
|
||||||
if (node != NULL) {
|
if (node != NULL) {
|
||||||
struct pci_dn *pdn = PCI_DN(node);
|
struct pci_dn *pdn = PCI_DN(node);
|
||||||
u32 *agent;
|
const u32 *agent;
|
||||||
|
|
||||||
agent = (u32 *)get_property(node, "linux,agent-id",
|
agent = get_property(node, "linux,agent-id", NULL);
|
||||||
NULL);
|
|
||||||
if ((pdn != NULL) && (agent != NULL)) {
|
if ((pdn != NULL) && (agent != NULL)) {
|
||||||
u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
|
u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
|
||||||
pdn->bussubno);
|
pdn->bussubno);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче