Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f4e7eda authored by Cornelia Huck's avatar Cornelia Huck Committed by Martin Schwidefsky
Browse files

[S390] bus_id -> dev_set_name() for css and ccw busses



Convert remaining s390 users setting bus_id to dev_set_name()
or init_name.

Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 9286b7ed
Loading
Loading
Loading
Loading
+11 −2
Original line number Original line Diff line number Diff line
@@ -571,8 +571,10 @@ int cio_validate_subchannel(struct subchannel *sch, struct subchannel_id schid)
	}
	}
	mutex_init(&sch->reg_mutex);
	mutex_init(&sch->reg_mutex);
	/* Set a name for the subchannel */
	/* Set a name for the subchannel */
	snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid,
	if (cio_is_console(schid))
		  schid.sch_no);
		sch->dev.init_name = cio_get_console_sch_name(schid);
	else
		dev_set_name(&sch->dev, "0.%x.%04x", schid.ssid, schid.sch_no);


	/*
	/*
	 * The first subchannel that is not-operational (ccode==3)
	 * The first subchannel that is not-operational (ccode==3)
@@ -677,6 +679,7 @@ do_IRQ (struct pt_regs *regs)


#ifdef CONFIG_CCW_CONSOLE
#ifdef CONFIG_CCW_CONSOLE
static struct subchannel console_subchannel;
static struct subchannel console_subchannel;
static char console_sch_name[10] = "0.x.xxxx";
static struct io_subchannel_private console_priv;
static struct io_subchannel_private console_priv;
static int console_subchannel_in_use;
static int console_subchannel_in_use;


@@ -827,6 +830,12 @@ cio_get_console_subchannel(void)
	return &console_subchannel;
	return &console_subchannel;
}
}


const char *cio_get_console_sch_name(struct subchannel_id schid)
{
	snprintf(console_sch_name, 10, "0.%x.%04x", schid.ssid, schid.sch_no);
	return (const char *)console_sch_name;
}

#endif
#endif
static int
static int
__disable_subchannel_easy(struct subchannel_id schid, struct schib *schib)
__disable_subchannel_easy(struct subchannel_id schid, struct schib *schib)
+4 −0
Original line number Original line Diff line number Diff line
@@ -117,11 +117,15 @@ extern int cio_is_console(struct subchannel_id);
extern struct subchannel *cio_get_console_subchannel(void);
extern struct subchannel *cio_get_console_subchannel(void);
extern spinlock_t * cio_get_console_lock(void);
extern spinlock_t * cio_get_console_lock(void);
extern void *cio_get_console_priv(void);
extern void *cio_get_console_priv(void);
extern const char *cio_get_console_sch_name(struct subchannel_id schid);
extern const char *cio_get_console_cdev_name(struct subchannel *sch);
#else
#else
#define cio_is_console(schid) 0
#define cio_is_console(schid) 0
#define cio_get_console_subchannel() NULL
#define cio_get_console_subchannel() NULL
#define cio_get_console_lock() NULL
#define cio_get_console_lock() NULL
#define cio_get_console_priv() NULL
#define cio_get_console_priv() NULL
#define cio_get_console_sch_name(schid) NULL
#define cio_get_console_cdev_name(sch) NULL
#endif
#endif


#endif
#endif
+14 −2
Original line number Original line Diff line number Diff line
@@ -1035,7 +1035,10 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
	init_timer(&priv->timer);
	init_timer(&priv->timer);


	/* Set an initial name for the device. */
	/* Set an initial name for the device. */
	snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x",
	if (cio_is_console(sch->schid))
		cdev->dev.init_name = cio_get_console_cdev_name(sch);
	else
		dev_set_name(&cdev->dev, "0.%x.%04x",
			     sch->schid.ssid, sch->schib.pmcw.dev);
			     sch->schid.ssid, sch->schib.pmcw.dev);


	/* Increase counter of devices currently in recognition. */
	/* Increase counter of devices currently in recognition. */
@@ -1625,6 +1628,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int slow)


#ifdef CONFIG_CCW_CONSOLE
#ifdef CONFIG_CCW_CONSOLE
static struct ccw_device console_cdev;
static struct ccw_device console_cdev;
static char console_cdev_name[10] = "0.x.xxxx";
static struct ccw_device_private console_private;
static struct ccw_device_private console_private;
static int console_cdev_in_use;
static int console_cdev_in_use;


@@ -1695,6 +1699,14 @@ ccw_device_probe_console(void)
	console_cdev.online = 1;
	console_cdev.online = 1;
	return &console_cdev;
	return &console_cdev;
}
}


const char *cio_get_console_cdev_name(struct subchannel *sch)
{
	snprintf(console_cdev_name, 10, "0.%x.%04x",
		 sch->schid.ssid, sch->schib.pmcw.dev);
	return (const char *)console_cdev_name;
}
#endif
#endif


/*
/*