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

Commit 1125b464 authored by Cornelia Huck's avatar Cornelia Huck Committed by Martin Schwidefsky
Browse files

[S390] cio: Use device_{create,remove}_bin_file.



Create/remove the channel measurement binary files with
device_{create,remove}_bin_file instead of sysfs_{create,remove}_bin_file.

Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent c59d744b
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -967,8 +967,8 @@ static struct bin_attribute chp_measurement_attr = {
static void
static void
chsc_remove_chp_cmg_attr(struct channel_path *chp)
chsc_remove_chp_cmg_attr(struct channel_path *chp)
{
{
	sysfs_remove_bin_file(&chp->dev.kobj, &chp_measurement_chars_attr);
	device_remove_bin_file(&chp->dev, &chp_measurement_chars_attr);
	sysfs_remove_bin_file(&chp->dev.kobj, &chp_measurement_attr);
	device_remove_bin_file(&chp->dev, &chp_measurement_attr);
}
}


static int
static int
@@ -976,14 +976,12 @@ chsc_add_chp_cmg_attr(struct channel_path *chp)
{
{
	int ret;
	int ret;


	ret = sysfs_create_bin_file(&chp->dev.kobj,
	ret = device_create_bin_file(&chp->dev, &chp_measurement_chars_attr);
				    &chp_measurement_chars_attr);
	if (ret)
	if (ret)
		return ret;
		return ret;
	ret = sysfs_create_bin_file(&chp->dev.kobj, &chp_measurement_attr);
	ret = device_create_bin_file(&chp->dev, &chp_measurement_attr);
	if (ret)
	if (ret)
		sysfs_remove_bin_file(&chp->dev.kobj,
		device_remove_bin_file(&chp->dev, &chp_measurement_chars_attr);
				      &chp_measurement_chars_attr);
	return ret;
	return ret;
}
}