/* Set gate source for an '8254' counter subdevice channel.  */
static int dio200_set_gate_src(struct dio200_subdev_8254 *subpriv, unsigned int counter_number, unsigned int gate_src)
/* Set gate source for an '8254' counter subdevice channel.  */
static int dio200_set_gate_src(struct dio200_subdev_8254 *subpriv, unsigned int counter_number, unsigned int gate_src)
{
	unsigned char byte;
	if (!subpriv->has_clk_gat_sce)
		return -1;
	if (counter_number > 2)
		return -1;
	if (gate_src > 7)
		return -1;
	subpriv->gate_src[counter_number] = gate_src;
	byte = GAT_SCE(subpriv->which, counter_number, gate_src);
	outb(byte, subpriv->gat_sce_iobase);
	return 0;
}