FreeBSD/sys/arm/samsung/exynos/chrome_kb.c
/* Allocates a new array for keymap and returns it in 'keymap'. */
Allocates a new array for keymap and returns it in 'keymap'.
Allocates a new array for keymap and returns it in ' keymap ' .
static int
read_keymap(phandle_t node, const char *prop, pcell_t **keymap, size_t *len)
{
	if ((*len = OF_getproplen(node, prop)) <= 0) {
		return (ENXIO);
	}
	if ((*keymap = malloc(*len, M_DEVBUF, M_NOWAIT)) == NULL) {
		return (ENOMEM);
	}
	if (OF_getencprop(node, prop, *keymap, *len) != *len) {
		return (ENXIO);
	}
	return (0);
}
static int read_keymap ( phandle_t node , const char * prop , pcell_t * * keymap , size_t * len ) { if ( ( * len = OF_getproplen ( node , prop ) ) <= 0 ) { return ( ENXIO ) ; } if ( ( * keymap = malloc ( * len , M_DEVBUF , M_NOWAIT ) ) == NULL ) { return ( ENOMEM ) ; } if ( OF_getencprop ( node , prop , * keymap , * len ) != * len ) { return ( ENXIO ) ; } return ( 0 ) ; }
Allocates a new array for keymap and returns it in 'keymap'.
Allocates a new array for keymap and returns it in ' keymap ' .