Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 20 Oct 2002 05:45:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 20 Oct 2002 05:44:28 -0400 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:56875 "EHLO frodo.biederman.org") by vger.kernel.org with ESMTP id ; Sun, 20 Oct 2002 05:43:32 -0400 To: Patrick Mochel Cc: Subject: Re: Patch: linux-2.5.42/kernel/sys.c - warm reboot should not suspend devices References: From: ebiederm@xmission.com (Eric W. Biederman) Date: 20 Oct 2002 03:47:56 -0600 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1063 Lines: 22 Assuming it is worth it to split remove into 2 parts, we need the following so rmmod calls ->shutdown. Otherwise we will get code duplication in the drivers. And then we need all of the patches that split remove into 2 parts, in the drivers. Eric diff -uNr linux-2.5.44/drivers/base/bus.c linux-2.5.44.shutdown/drivers/base/bus.c --- linux-2.5.44/drivers/base/bus.c Sat Oct 19 00:57:58 2002 +++ linux-2.5.44.shutdown/drivers/base/bus.c Sun Oct 20 03:44:46 2002 @@ -164,6 +164,8 @@ if (drv) { list_del_init(&dev->driver_list); devclass_remove_device(dev); + if (drv->shutdown && device_present(drv)) + drv->shutdown(dev); if (drv->remove) drv->remove(dev); dev->driver = NULL; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/