From patchwork Tue Jul 3 06:05:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yasuaki Ishimatsu X-Patchwork-Id: 1149191 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2D27A3FE4F for ; Tue, 3 Jul 2012 06:05:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933358Ab2GCGFa (ORCPT ); Tue, 3 Jul 2012 02:05:30 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:37332 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933208Ab2GCGF3 (ORCPT ); Tue, 3 Jul 2012 02:05:29 -0400 Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id D18DD3EE0C3; Tue, 3 Jul 2012 15:05:28 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id B553045DE59; Tue, 3 Jul 2012 15:05:28 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 9C3B045DE55; Tue, 3 Jul 2012 15:05:28 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 8C1F01DB8052; Tue, 3 Jul 2012 15:05:28 +0900 (JST) Received: from g01jpexchyt05.g01.fujitsu.local (g01jpexchyt05.g01.fujitsu.local [10.128.194.44]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 3DB0C1DB8056; Tue, 3 Jul 2012 15:05:28 +0900 (JST) Received: from [127.0.0.1] (10.124.101.33) by g01jpexchyt05.g01.fujitsu.local (10.128.194.44) with Microsoft SMTP Server id 14.2.309.2; Tue, 3 Jul 2012 15:05:25 +0900 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <4FF28B9B.5010409@jp.fujitsu.com> Date: Tue, 3 Jul 2012 15:05:15 +0900 From: Yasuaki Ishimatsu User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: , , , CC: , , , , , , , , Subject: [RFC PATCH v2 12/13] memory-hotplug : add node_device_release References: <4FF287C3.4030901@jp.fujitsu.com> In-Reply-To: <4FF287C3.4030901@jp.fujitsu.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org When calling unregister_node(), the function shows following message at device_release(). Device 'node2' does not have a release() function, it is broken and must be fixed. So the patch implements node_device_release() CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro Signed-off-by: Yasuaki Ishimatsu --- drivers/base/node.c | 7 +++++++ 1 file changed, 7 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-3.5-rc4/drivers/base/node.c =================================================================== --- linux-3.5-rc4.orig/drivers/base/node.c 2012-07-03 14:21:44.882432167 +0900 +++ linux-3.5-rc4/drivers/base/node.c 2012-07-03 14:22:23.296951921 +0900 @@ -252,6 +252,12 @@ static inline void hugetlb_register_node static inline void hugetlb_unregister_node(struct node *node) {} #endif +static void node_device_release(struct device *dev) +{ + struct node *node_dev = to_node(dev); + + memset(node_dev, 0, sizeof(struct node)); +} /* * register_node - Setup a sysfs device for a node. @@ -265,6 +271,7 @@ int register_node(struct node *node, int node->dev.id = num; node->dev.bus = &node_subsys; + node->dev.release = node_device_release; error = device_register(&node->dev); if (!error){