/* If there is any data available in the PS/2 receiver, this functions reads the data, otherwise it returns error.  */
static int xps2_recv(struct xps2data *drvdata, u8 *byte)
/* If there is any data available in the PS/2 receiver, this functions reads the data, otherwise it returns error.  */
static int xps2_recv(struct xps2data *drvdata, u8 *byte)
{
	u32 sr;
	int status = -1;
	sr = in_be32(drvdata->base_address + XPS2_STATUS_OFFSET);
	if (sr & XPS2_STATUS_RX_FULL) {
		*byte = in_be32(drvdata->base_address + XPS2_RX_DATA_OFFSET);
		status = 0;
	}
	return status;
}