/* Reads a 16 bit integer from the address space of a given SDIO function. If there is a problem reading the address, 0xffff is returned and @err_ret will contain the error code.  */
u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret)
/* Reads a 16 bit integer from the address space of a given SDIO function. If there is a problem reading the address, 0xffff is returned and @err_ret will contain the error code.  */
u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret)
{
	int ret;
	if (err_ret)
		*err_ret = 0;
	ret = sdio_memcpy_fromio(func, func->tmpbuf, addr, 2);
	if (ret) {
		if (err_ret)
			*err_ret = ret;
		return 0xFFFF;
	}
	return le16_to_cpup((__le16 *)func->tmpbuf);
}