From patchwork Wed Dec 8 19:16:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 391742 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB8JHWh9005710 for ; Wed, 8 Dec 2010 19:17:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756308Ab0LHTRb (ORCPT ); Wed, 8 Dec 2010 14:17:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48320 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756302Ab0LHTRa (ORCPT ); Wed, 8 Dec 2010 14:17:30 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB8JHTCf026452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Dec 2010 14:17:29 -0500 Received: from xavier.bos.redhat.com (xavier.bos.redhat.com [10.16.16.50]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB8JGoRs010975; Wed, 8 Dec 2010 14:17:29 -0500 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: Paul Bender , Jarod Wilson Subject: [PATCH 08/12] rc: fix sysfs entry for mceusb and streamzap Date: Wed, 8 Dec 2010 14:16:06 -0500 Message-Id: <1291835770-21592-9-git-send-email-jarod@redhat.com> In-Reply-To: <1291835770-21592-1-git-send-email-jarod@redhat.com> References: <1291835770-21592-1-git-send-email-jarod@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 08 Dec 2010 19:17:33 +0000 (UTC) difficult to make use of the devices in userspace as their names can change. Signed-off-by: Paul Bender Signed-off-by: Jarod Wilson --- drivers/media/IR/mceusb.c | 7 +++++-- drivers/media/IR/streamzap.c | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c index ba22459..57ef809 100644 --- a/drivers/media/IR/mceusb.c +++ b/drivers/media/IR/mceusb.c @@ -35,10 +35,10 @@ #include #include #include -#include #include +#include +#include #include -#include #define DRIVER_VERSION "1.91" #define DRIVER_AUTHOR "Jarod Wilson " @@ -1079,6 +1079,9 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) ir->props = props; + usb_to_input_id(ir->usbdev, &idev->id); + idev->dev.parent = ir->dev; + if (mceusb_model[ir->model].rc_map) rc_map = mceusb_model[ir->model].rc_map; diff --git a/drivers/media/IR/streamzap.c b/drivers/media/IR/streamzap.c index c6157ee..3a20aef 100644 --- a/drivers/media/IR/streamzap.c +++ b/drivers/media/IR/streamzap.c @@ -34,8 +34,9 @@ #include #include #include -#include #include +#include +#include #include #define DRIVER_VERSION "1.61" @@ -332,6 +333,9 @@ static struct input_dev *streamzap_init_input_dev(struct streamzap_ir *sz) sz->props = props; + usb_to_input_id(sz->usbdev, &idev->id); + idev->dev.parent = sz->dev; + ret = ir_input_register(idev, RC_MAP_STREAMZAP, props, DRIVER_NAME); if (ret < 0) { dev_err(dev, "remote input device register failed\n");