/* Return the entire driver ports structure to a user app.  */
static int stli_getportstruct(struct stliport __user *arg)
/* Return the entire driver ports structure to a user app.  */
static int stli_getportstruct(struct stliport __user *arg)
{
	struct stliport stli_dummyport;
	struct stliport *portp;
	if (copy_from_user(&stli_dummyport, arg, sizeof(struct stliport)))
		return -EFAULT;
	portp = stli_getport(stli_dummyport.brdnr, stli_dummyport.panelnr,
		 stli_dummyport.portnr);
	if (!portp)
		return -ENODEV;
	if (copy_to_user(arg, portp, sizeof(struct stliport)))
		return -EFAULT;
	return 0;
}