/* All flags specified in @flags are set, all flags not specified in @flags are cleared. Returns: %0 on success, -EINVAL on an invalid flag combination.  */
int ccw_device_set_options_mask(struct ccw_device *cdev, unsigned long flags)
/* All flags specified in @flags are set, all flags not specified in @flags are cleared. Returns: %0 on success, -EINVAL on an invalid flag combination.  */
int ccw_device_set_options_mask(struct ccw_device *cdev, unsigned long flags)
{
	if ((flags & CCWDEV_EARLY_NOTIFICATION) &&
	    (flags & CCWDEV_REPORT_ALL))
		return -EINVAL;
	cdev->private->options.fast = (flags & CCWDEV_EARLY_NOTIFICATION) != 0;
	cdev->private->options.repall = (flags & CCWDEV_REPORT_ALL) != 0;
	cdev->private->options.pgroup = (flags & CCWDEV_DO_PATHGROUP) != 0;
	cdev->private->options.force = (flags & CCWDEV_ALLOW_FORCE) != 0;
	cdev->private->options.mpath = (flags & CCWDEV_DO_MULTIPATH) != 0;
	return 0;
}