/* memstick_add_host - start request processing on memstick host @host - host to use  */
int memstick_add_host(struct memstick_host *host)
/* memstick_add_host - start request processing on memstick host @host - host to use  */
int memstick_add_host(struct memstick_host *host)
{
	int rc;
	if (!idr_pre_get(&memstick_host_idr, GFP_KERNEL))
		return -ENOMEM;
	spin_lock(&memstick_host_lock);
	rc = idr_get_new(&memstick_host_idr, host, &host->id);
	spin_unlock(&memstick_host_lock);
	if (rc)
		return rc;
	dev_set_name(&host->dev, "memstick%u", host->id);
	rc = device_add(&host->dev);
	if (rc) {
		spin_lock(&memstick_host_lock);
		idr_remove(&memstick_host_idr, host->id);
		spin_unlock(&memstick_host_lock);
		return rc;
	}
	host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF);
	memstick_detect_change(host);
	return 0;
}