mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
This commit is contained in:
parent
eeb2b723ef
commit
018a3d1db7
29 changed files with 166 additions and 158 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue