From patchwork Thu Jun 13 16:32:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2717791 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 85F08C0AB1 for ; Thu, 13 Jun 2013 16:37:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9865A20450 for ; Thu, 13 Jun 2013 16:37:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8FC420461 for ; Thu, 13 Jun 2013 16:37:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758657Ab3FMQfd (ORCPT ); Thu, 13 Jun 2013 12:35:33 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:64379 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758658Ab3FMQfa (ORCPT ); Thu, 13 Jun 2013 12:35:30 -0400 Received: by mail-pa0-f47.google.com with SMTP id kl14so4929604pab.34 for ; Thu, 13 Jun 2013 09:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=AKFVTK67OZHV6QCNOlJJswVU2ExJZ+AlTJ7ILV+sDx4=; b=JXFWBIdkOlUckLz02r6/Uk2PCpQpsUutocDlujeo/2KdeL67qvXKxdhbPzflsrStHF 7DrGIb+s+5To1mDvt9+cbFp/Gmv5MqUqqRNudBLB4Rvckaros6XzF+7DBHUO9pCdi1wn Mh4xf3eV64aDsEeQxD/B/2/YV9BbXnB3BskfWgtzhWbuoZegOpYikmuDTRVNyNhLksxK /XTNE6LXyOiiFJwkFMN8u7ZKi1PKJHMKmvkAg87ezsxLsH2/zGQIenwKuwd4V5zPypdh xlXYUERoqMjg9VN/THuiyEgJ1fCXusQCs3K33YlADApxJg2ekkMRi1dEX5/hh3zEmGho egSA== X-Received: by 10.66.119.103 with SMTP id kt7mr3536345pab.125.1371141330029; Thu, 13 Jun 2013 09:35:30 -0700 (PDT) Received: from localhost.localdomain ([114.250.95.159]) by mx.google.com with ESMTPSA id ty8sm176964pac.8.2013.06.13.09.35.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Jun 2013 09:35:29 -0700 (PDT) From: Jiang Liu To: "Rafael J . Wysocki" , Bjorn Helgaas , Yinghai Lu , "Alexander E . Patrakov" Cc: Jiang Liu , Greg Kroah-Hartman , Yijing Wang , Jiang Liu , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Shaohua Li , Len Brown , linux-acpi@vger.kernel.org Subject: [BUGFIX 3/9] ACPI, DOCK: clean up unused module related code Date: Fri, 14 Jun 2013 00:32:26 +0800 Message-Id: <1371141152-9468-4-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1371141152-9468-1-git-send-email-jiang.liu@huawei.com> References: <1371141152-9468-1-git-send-email-jiang.liu@huawei.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ACPI dock driver can't be built as a module any more, so clean up module related code. Signed-off-by: Jiang Liu Cc: Shaohua Li Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/acpi/dock.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 79c8d9e..50e38b7 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -53,12 +53,6 @@ MODULE_PARM_DESC(immediate_undock, "1 (default) will cause the driver to " static struct atomic_notifier_head dock_notifier_list; -static const struct acpi_device_id dock_device_ids[] = { - {"LNXDOCK", 0}, - {"", 0}, -}; -MODULE_DEVICE_TABLE(acpi, dock_device_ids); - struct dock_station { acpi_handle handle; unsigned long last_dock_time; @@ -1013,30 +1007,6 @@ err_unregister: } /** - * dock_remove - free up resources related to the dock station - */ -static int dock_remove(struct dock_station *ds) -{ - struct dock_dependent_device *dd, *tmp; - struct platform_device *dock_device = ds->dock_device; - - if (!dock_station_count) - return 0; - - /* remove dependent devices */ - list_for_each_entry_safe(dd, tmp, &ds->dependent_devices, list) - kfree(dd); - - list_del(&ds->sibling); - - /* cleanup sysfs */ - sysfs_remove_group(&dock_device->dev.kobj, &dock_attribute_group); - platform_device_unregister(dock_device); - - return 0; -} - -/** * find_dock_and_bay - look for dock stations and bays * @handle: acpi handle of a device * @lvl: unused @@ -1073,14 +1043,3 @@ int __init acpi_dock_init(void) ACPI_DOCK_DRIVER_DESCRIPTION, dock_station_count); return 0; } - -static void __exit dock_exit(void) -{ - struct dock_station *tmp, *dock_station; - - unregister_acpi_bus_notifier(&dock_acpi_notifier); - list_for_each_entry_safe(dock_station, tmp, &dock_stations, sibling) - dock_remove(dock_station); -} - -module_exit(dock_exit);