From patchwork Fri Sep 7 07:13:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 1420261 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 49C42DF283 for ; Fri, 7 Sep 2012 07:13:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754925Ab2IGHNa (ORCPT ); Fri, 7 Sep 2012 03:13:30 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:48488 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754522Ab2IGHNa (ORCPT ); Fri, 7 Sep 2012 03:13:30 -0400 Received: by iahk25 with SMTP id k25so2932525iah.19 for ; Fri, 07 Sep 2012 00:13:29 -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:in-reply-to:references :content-type:x-mailer:content-transfer-encoding:mime-version; bh=NQm+QW+Nr767KEFMGmjD9wiCHIkgGGxopitcba/bOUg=; b=Mt7uErf5hfTtMZWttVGcJTib+ESkhZu8jDzlzPxzAPCkavRfNCMNUqQLR0QHMAXs00 0cE5jm7UZGmBgNLc7JXQQxqyFByI19HwXm/TwIgvJxE0L//TA2mSBOO5q4uxDPg5LBhv ilC2wvBVCCy4IufJxJBkjeWHkCduu/f2zl/bha8hvKEKzScAZPZD/FpB5p11vYcP76fg RxcY6CUCbs5FwPWXJB8ZLF4QUDeA7X2goba2KS3VEq2xAJegeeSAEgP94CBVss4AmQX+ cI+j3eHvqmfLrs9e4em45qdPpLrNn1ebpeWojjEQMrJimPGGHJhR1SaiQkKqtPhvm891 GfoQ== Received: by 10.43.97.8 with SMTP id ci8mr5670017icc.28.1347002009738; Fri, 07 Sep 2012 00:13:29 -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 ng5sm7087734igc.0.2012.09.07.00.13.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Sep 2012 00:13:29 -0700 (PDT) Message-ID: <1347002004.30222.3.camel@phoenix> Subject: [PATCH 2/2] HID: waltop: Remove waltop_probe() and waltop_remove() functions From: Axel Lin To: Jiri Kosina Cc: Nikolai Kondrashov , linux-input@vger.kernel.org Date: Fri, 07 Sep 2012 15:13:24 +0800 In-Reply-To: <1347001910.30222.1.camel@phoenix> References: <1347001910.30222.1.camel@phoenix> 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 waltop_probe() and waltop_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 Signed-off-by: Nikolai Kondrashov Acked-by: Nikolai Kondrashov --- drivers/hid/hid-waltop.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/drivers/hid/hid-waltop.c b/drivers/hid/hid-waltop.c index 745e4e9..bb536ab 100644 --- a/drivers/hid/hid-waltop.c +++ b/drivers/hid/hid-waltop.c @@ -638,28 +638,6 @@ static __u8 sirius_battery_free_tablet_rdesc_fixed[] = { 0xC0 /* End Collection */ }; -static int waltop_probe(struct hid_device *hdev, - const struct hid_device_id *id) -{ - int ret; - - ret = hid_parse(hdev); - if (ret) { - hid_err(hdev, "parse failed\n"); - goto err; - } - - ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); - if (ret) { - hid_err(hdev, "hw start failed\n"); - goto err; - } - - return 0; -err: - return ret; -} - static __u8 *waltop_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { @@ -776,11 +754,6 @@ static int waltop_raw_event(struct hid_device *hdev, struct hid_report *report, return 0; } -static void waltop_remove(struct hid_device *hdev) -{ - hid_hw_stop(hdev); -} - static const struct hid_device_id waltop_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) }, @@ -803,10 +776,8 @@ MODULE_DEVICE_TABLE(hid, waltop_devices); static struct hid_driver waltop_driver = { .name = "waltop", .id_table = waltop_devices, - .probe = waltop_probe, .report_fixup = waltop_report_fixup, .raw_event = waltop_raw_event, - .remove = waltop_remove, }; static int __init waltop_init(void)