pseries: Fix qdev.id handling in the VIO bus code
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 15 Nov 2011 18:53:13 +0000 (18:53 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 18 Nov 2011 13:26:30 +0000 (14:26 +0100)
commitf1f20899b3702ea8c046b9c822acb51e06b081fb
tree71a13b9ee37a71b2c4d1a2a03b772bb1c2ad00b8
parent18d1feecd3188f6f91026e9c6436728f84fda890
pseries: Fix qdev.id handling in the VIO bus code

When the user creates a device on the command line with -device, they
can specify the id, using id=foo. Currently the VIO bus code overwrites
this id with it's own value. We should only set qdev.id if it is not
already set by the user.

The device tree code uses qdev.id for the device tree node name, however
we can't rely on the user specifiying the id using proper device tree
syntax, ie. device@reg. So separate the device tree node name from the
qdev.id, but use the same syntax, so they will match by default.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr_vio.c