/* hdaps_readb_one - reads a byte from a single I/O port, placing the value in the given pointer. Returns zero on success or a negative error on failure. Can sleep.  */
static int hdaps_readb_one(unsigned int port, u8 *val)
/* hdaps_readb_one - reads a byte from a single I/O port, placing the value in the given pointer. Returns zero on success or a negative error on failure. Can sleep.  */
static int hdaps_readb_one(unsigned int port, u8 *val)
{
	int ret;
	mutex_lock(&hdaps_mtx);
	ret = __device_refresh_sync();
	if (ret)
		goto out;
	*val = inb(port);
	__device_complete();
out:
	mutex_unlock(&hdaps_mtx);
	return ret;
}