/* Register an AMBA device driver with the Linux device model core. If devices pre-exist, the drivers probe function will be called.  */
int amba_driver_register(struct amba_driver *drv)
/* Register an AMBA device driver with the Linux device model core. If devices pre-exist, the drivers probe function will be called.  */
int amba_driver_register(struct amba_driver *drv)
{
	drv->drv.bus = &amba_bustype;
#define SETFN(fn)	if (drv->fn) drv->drv.fn = amba_##fn
	SETFN(probe);
	SETFN(remove);
	SETFN(shutdown);
	return driver_register(&drv->drv);
}