From patchwork Fri Sep 7 07:11:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 1420251 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C5D98DF283 for ; Fri, 7 Sep 2012 07:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754801Ab2IGHL7 (ORCPT ); Fri, 7 Sep 2012 03:11:59 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:43227 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754522Ab2IGHL6 (ORCPT ); Fri, 7 Sep 2012 03:11:58 -0400 Received: by ieje11 with SMTP id e11so4522102iej.19 for ; Fri, 07 Sep 2012 00:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:content-type:x-mailer :content-transfer-encoding:mime-version; bh=Z6C7N/HzfCBbOrT85s4SAT4RuKFhuT86P+K0McwzCn0=; b=ZYCEpHtOJrId0U+8LF3MyyNzUTYssP51DWjd39p8Qz/SztuGhxPpz9Fwc3p9UOyIRI Yj3j159kOhda8Cdg6BLW2uqI4IwCrRRjEaRo5WF95+3T9BnhIC+vhGAQhUU5CWMkIucj pErH5KGn4/xoG6/3+TS5vaEIx1OusqtF5j16SXwiDrw8OyRKITTR4O4PDDvk8eC91peZ TTfVjr895XBHe9oLamCTqYrKu1PFoVVInYWsfyTaZ5fY9DgfWOmFeXr6MaQbs3voUCaH gcDI75Ra8+mxZMe2VIKELAfxbWY/wCerPBOMke0SX8IByEtHeGy2F/Iv4E03tQIbxoha 58Kw== Received: by 10.50.17.132 with SMTP id o4mr6874554igd.17.1347001918015; Fri, 07 Sep 2012 00:11:58 -0700 (PDT) Received: from [218.173.175.203] (218-173-175-203.dynamic.hinet.net. [218.173.175.203]) by mx.google.com with ESMTPS id ch4sm7077090igb.2.2012.09.07.00.11.55 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Sep 2012 00:11:57 -0700 (PDT) Message-ID: <1347001910.30222.1.camel@phoenix> Subject: [PATCH 1/2] HID: primax: Remove px_probe() and px_remove() functions From: Axel Lin To: Jiri Kosina Cc: Terry Lambert , linux-input@vger.kernel.org Date: Fri, 07 Sep 2012 15:11:50 +0800 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The px_probe() and px_remove() functions do not have any special initialization and cleanup. Remove them and let HID core handle the default probe/remove actions. Signed-off-by: Axel Lin --- drivers/hid/hid-primax.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/drivers/hid/hid-primax.c b/drivers/hid/hid-primax.c index 4d3c60d..c15adb0 100644 --- a/drivers/hid/hid-primax.c +++ b/drivers/hid/hid-primax.c @@ -64,29 +64,6 @@ static int px_raw_event(struct hid_device *hid, struct hid_report *report, return 0; } -static int px_probe(struct hid_device *hid, const struct hid_device_id *id) -{ - int ret; - - ret = hid_parse(hid); - if (ret) { - hid_err(hid, "parse failed\n"); - goto fail; - } - - ret = hid_hw_start(hid, HID_CONNECT_DEFAULT); - if (ret) - hid_err(hid, "hw start failed\n"); - -fail: - return ret; -} - -static void px_remove(struct hid_device *hid) -{ - hid_hw_stop(hid); -} - static const struct hid_device_id px_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) }, { } @@ -97,8 +74,6 @@ static struct hid_driver px_driver = { .name = "primax", .id_table = px_devices, .raw_event = px_raw_event, - .probe = px_probe, - .remove = px_remove, }; static int __init px_init(void)