* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "sysbus.h"
void sysbus_connect_irq(SysBusDevice *dev, int n, qemu_irq irq)
{
assert(n >= 0 && n < dev->num_irq);
- dev->irqs[n] = 0;
+ dev->irqs[n] = NULL;
if (dev->irqp[n]) {
*dev->irqp[n] = irq;
}
dev->mmio[n].cb = cb;
}
-static void sysbus_device_init(DeviceState *dev, DeviceInfo *base)
+static int sysbus_device_init(DeviceState *dev, DeviceInfo *base)
{
SysBusDeviceInfo *info = container_of(base, SysBusDeviceInfo, qdev);
- info->init(sysbus_from_qdev(dev));
+ return info->init(sysbus_from_qdev(dev));
}
void sysbus_register_withprop(SysBusDeviceInfo *info)
dev = qdev_create(NULL, name);
s = sysbus_from_qdev(dev);
- qdev_init(dev);
+ qdev_init_nofail(dev);
if (addr != (target_phys_addr_t)-1) {
sysbus_mmio_map(s, 0, addr);
}