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