From owner-freebsd-multimedia@FreeBSD.ORG Sat Jan 8 20:30:02 2011 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D388106564A for ; Sat, 8 Jan 2011 20:30:02 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id A7A5B8FC16 for ; Sat, 8 Jan 2011 20:30:01 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=Samd3CrC35PkFKGRAwjtIWdtalA6bcxM9GrYwcNK+gA= c=1 sm=1 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=pGLkceISAAAA:8 a=ZWb0CaoHcVn7J81iacsA:9 a=NV3kyJrxrcimEY4gpG5_QXuCCOUA:4 a=PUjeQqilurYA:10 a=MSl-tDqOz04A:10 a=5VbSU5FU7DXchvVxBoUA:9 a=XcnPMx5vqH8p3SxHIRsA:7 a=6O1r0T5NhPNCO4WNhennennoRT0A:4 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 71474729; Sat, 08 Jan 2011 21:30:00 +0100 From: Hans Petter Selasky To: freebsd-multimedia@freebsd.org Date: Sat, 8 Jan 2011 21:30:05 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?iso-8859-1?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?iso-8859-1?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7Co?= =?iso-8859-1?q?TlKMusi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_NlMKNn+ypYWmYKI" Message-Id: <201101082130.05180.hselasky@c2i.net> Cc: Subject: Re: em28xx? X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jan 2011 20:30:02 -0000 --Boundary-00=_NlMKNn+ypYWmYKI Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit On Saturday 08 January 2011 20:49:59 Andrew Gallatin wrote: > On Sat, Jan 8, 2011 at 2:11 PM, Andrew Gallatin wrote: > > (see appended output). Has anybody tried this before? What are the > > general steps for porting a driver? > > So I hacked on it for a while (see attached dirty patch) and I've got Try the attached patch. --HPS --Boundary-00=_NlMKNn+ypYWmYKI Content-Type: text/x-patch; charset="iso-8859-15"; name="linux_usb.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="linux_usb.c.patch" Index: kernel/linux_usb.c =================================================================== --- kernel/linux_usb.c (revision 1678) +++ kernel/linux_usb.c (working copy) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2009-2011 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1077,6 +1077,8 @@ } p_ud->parent = sc; + p_ud->dev.driver_static.name = "webcamd"; + p_ud->dev.driver = &p_ud->dev.driver_static; get_device(&p_ud->dev); /* make sure we don't get freed */ --Boundary-00=_NlMKNn+ypYWmYKI--