Skip to content

Commit

Permalink
ide: fix IDE PMAC breakage
Browse files Browse the repository at this point in the history
Bartlomiej Zolnierkiewicz <[email protected]> writes:

> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
> ---
>  drivers/ide/ide-probe.c |    9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> Index: b/drivers/ide/ide-probe.c
> ===================================================================
> --- a/drivers/ide/ide-probe.c
> +++ b/drivers/ide/ide-probe.c
> @@ -640,14 +640,9 @@ static int ide_register_port(ide_hwif_t 
>  	/* register with global device tree */
>  	dev_set_name(&hwif->gendev, hwif->name);
>  	hwif->gendev.driver_data = hwif;
> -	if (hwif->gendev.parent == NULL) {
> -		if (hwif->dev)
> -			hwif->gendev.parent = hwif->dev;
> -		else
> -			/* Would like to do = &device_legacy */
> -			hwif->gendev.parent = NULL;
> -	}
> +	hwif->gendev.parent = hwif->dev;

This [bart: commit 96d4094 ("ide: small
ide_register_port() cleanup")] breaks ide-pmac.  It overwrites the parent
that pmac_ide_macio_attach has set.

Signed-off-by: Andreas Schwab <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
  • Loading branch information
andreas-schwab authored and bzolnier committed Jan 19, 2009
1 parent f3b8436 commit bb54aff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,8 @@ static int ide_register_port(ide_hwif_t *hwif)
/* register with global device tree */
dev_set_name(&hwif->gendev, hwif->name);
hwif->gendev.driver_data = hwif;
hwif->gendev.parent = hwif->dev;
if (hwif->gendev.parent == NULL)
hwif->gendev.parent = hwif->dev;
hwif->gendev.release = hwif_release_dev;

ret = device_register(&hwif->gendev);
Expand Down

0 comments on commit bb54aff

Please sign in to comment.