[POWERPC] powermac: 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. powermac platform & macintosh driver changes. Built for pmac32_defconfig, g5_defconfig Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
eeb2b723ef
commit
018a3d1db7
@@ -1154,7 +1154,7 @@ static int
|
||||
pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
|
||||
{
|
||||
struct device_node *np = pmif->node;
|
||||
int *bidp;
|
||||
const int *bidp;
|
||||
|
||||
pmif->cable_80 = 0;
|
||||
pmif->broken_dma = pmif->broken_dma_warn = 0;
|
||||
@@ -1176,14 +1176,14 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
|
||||
pmif->broken_dma = 1;
|
||||
}
|
||||
|
||||
bidp = (int *)get_property(np, "AAPL,bus-id", NULL);
|
||||
bidp = get_property(np, "AAPL,bus-id", NULL);
|
||||
pmif->aapl_bus_id = bidp ? *bidp : 0;
|
||||
|
||||
/* Get cable type from device-tree */
|
||||
if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6
|
||||
|| pmif->kind == controller_k2_ata6
|
||||
|| pmif->kind == controller_sh_ata6) {
|
||||
char* cable = get_property(np, "cable-type", NULL);
|
||||
const char* cable = get_property(np, "cable-type", NULL);
|
||||
if (cable && !strncmp(cable, "80-", 3))
|
||||
pmif->cable_80 = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user