/* Returns zero if the driver registered and bound to a device, else returns a negative error code and with the driver not registered.  */
int __init_or_module platform_driver_probe(struct platform_driver *drv, int(*probe)(struct platform_device *))
/* Returns zero if the driver registered and bound to a device, else returns a negative error code and with the driver not registered.  */
int __init_or_module platform_driver_probe(struct platform_driver *drv, int(*probe)(struct platform_device *))
{
	int retval, code;
	drv->driver.suppress_bind_attrs = true;
	drv->probe = probe;
	retval = code = platform_driver_register(drv);
	spin_lock(&platform_bus_type.p->klist_drivers.k_lock);
	drv->probe = NULL;
	if (code == 0 && list_empty(&drv->driver.p->klist_devices.k_list))
		retval = -ENODEV;
	drv->driver.probe = platform_drv_probe_fail;
	spin_unlock(&platform_bus_type.p->klist_drivers.k_lock);
	if (code != retval)
		platform_driver_unregister(drv);
	return retval;
}