From patchwork Wed Jul 28 02:24:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 114687 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6S2O8Nm012725 for ; Wed, 28 Jul 2010 02:24:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752101Ab0G1CYG (ORCPT ); Tue, 27 Jul 2010 22:24:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8832 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439Ab0G1CYD (ORCPT ); Tue, 27 Jul 2010 22:24:03 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6S2O1kK000877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Jul 2010 22:24:02 -0400 Received: from ihatethathostname.lab.bos.redhat.com (ihatethathostname.lab.bos.redhat.com [10.16.43.238]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6S2O1cI023720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Jul 2010 22:24:01 -0400 Received: from ihatethathostname.lab.bos.redhat.com (ihatethathostname.lab.bos.redhat.com [127.0.0.1]) by ihatethathostname.lab.bos.redhat.com (8.14.4/8.14.3) with ESMTP id o6S2O0uh005419; Tue, 27 Jul 2010 22:24:00 -0400 Received: (from jarod@localhost) by ihatethathostname.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o6S2O0rC005417; Tue, 27 Jul 2010 22:24:00 -0400 X-Authentication-Warning: ihatethathostname.lab.bos.redhat.com: jarod set sender to jarod@redhat.com using -f Date: Tue, 27 Jul 2010 22:24:00 -0400 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: Maxim Levitsky Subject: [PATCH] IR/mceusb: remove bad ir_input_dev use Message-ID: <20100728022400.GA5398@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 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 (demeter.kernel.org [140.211.167.41]); Wed, 28 Jul 2010 02:24:08 +0000 (UTC) diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c index 78bf7f7..9a7da32 100644 --- a/drivers/media/IR/mceusb.c +++ b/drivers/media/IR/mceusb.c @@ -228,7 +228,6 @@ static struct usb_device_id std_tx_mask_list[] = { /* data structure for each usb transceiver */ struct mceusb_dev { /* ir-core bits */ - struct ir_input_dev *irdev; struct ir_dev_props *props; struct ir_raw_event rawir; @@ -739,7 +738,7 @@ static void mceusb_dev_recv(struct urb *urb, struct pt_regs *regs) if (ir->send_flags == RECV_FLAG_IN_PROGRESS) { ir->send_flags = SEND_FLAG_COMPLETE; - dev_dbg(&ir->irdev->dev, "setup answer received %d bytes\n", + dev_dbg(&ir->dev, "setup answer received %d bytes\n", buf_len); } @@ -861,7 +860,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) { struct input_dev *idev; struct ir_dev_props *props; - struct ir_input_dev *irdev; struct device *dev = ir->dev; int ret = -ENODEV; @@ -878,12 +876,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) goto props_alloc_failed; } - irdev = kzalloc(sizeof(struct ir_input_dev), GFP_KERNEL); - if (!irdev) { - dev_err(dev, "remote ir input dev allocation failed\n"); - goto ir_dev_alloc_failed; - } - snprintf(ir->name, sizeof(ir->name), "Media Center Ed. eHome " "Infrared Remote Transceiver (%04x:%04x)", le16_to_cpu(ir->usbdev->descriptor.idVendor), @@ -902,9 +894,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) props->tx_ir = mceusb_tx_ir; ir->props = props; - ir->irdev = irdev; - - input_set_drvdata(idev, irdev); ret = ir_input_register(idev, RC_MAP_RC6_MCE, props, DRIVER_NAME); if (ret < 0) { @@ -915,8 +904,6 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) return idev; irdev_failed: - kfree(irdev); -ir_dev_alloc_failed: kfree(props); props_alloc_failed: input_free_device(idev);