From patchwork Mon Jul 27 03:06:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 37443 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6R37Eh1016661 for ; Mon, 27 Jul 2009 03:07:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755508AbZG0DHN (ORCPT ); Sun, 26 Jul 2009 23:07:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755576AbZG0DHN (ORCPT ); Sun, 26 Jul 2009 23:07:13 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:35650 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755508AbZG0DHM (ORCPT ); Sun, 26 Jul 2009 23:07:12 -0400 Received: from m6.gw.fujitsu.co.jp ([10.0.50.76]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n6R37BYW011257 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Mon, 27 Jul 2009 12:07:11 +0900 Received: from smail (m6 [127.0.0.1]) by outgoing.m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 17D2D45DE50 for ; Mon, 27 Jul 2009 12:07:11 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (s6.gw.fujitsu.co.jp [10.0.50.96]) by m6.gw.fujitsu.co.jp (Postfix) with ESMTP id F085945DE4F for ; Mon, 27 Jul 2009 12:07:10 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id D8AD8E08002 for ; Mon, 27 Jul 2009 12:07:10 +0900 (JST) Received: from m107.s.css.fujitsu.com (m107.s.css.fujitsu.com [10.249.87.107]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 96382E08001 for ; Mon, 27 Jul 2009 12:07:10 +0900 (JST) Received: from m107.css.fujitsu.com (m107 [127.0.0.1]) by m107.s.css.fujitsu.com (Postfix) with ESMTP id 6A37067000C; Mon, 27 Jul 2009 12:07:10 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m107.s.css.fujitsu.com (Postfix) with ESMTP id DFE4A670002; Mon, 27 Jul 2009 12:07:09 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Received: from KANE-LIFEBOOK[10.124.100.137] by KANE-LIFEBOOK (FujitsuOutboundMailChecker v1.3.1/9992[10.124.100.137]); Mon, 27 Jul 2009 12:06:55 +0900 (JST) Message-ID: <4A6D19C6.1030903@jp.fujitsu.com> Date: Mon, 27 Jul 2009 12:06:46 +0900 From: Kenji Kaneshige User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: prarit@sgi.com, dickie@sgi.com, habeck@sgi.com, jes@sgi.com, "linux-pci@vger.kernel.org" CC: Jesse Barnes , Alex Chiang Subject: [PATCH 2/2] SGI hotplug: do not use hotplug_slot_attr References: <4A6D1935.6060903@jp.fujitsu.com> In-Reply-To: <4A6D1935.6060903@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org By the pci slot changes, callbacks of attributes under slot directory (/sys/bus/pci/slots) had been changed to get the pointer to struct pci_slot instead of struct hotplug_slot. So the path_show() that assumes the parameter is a pointer to struct hotplug_slot seems broken. Signed-off-by: Kenji Kaneshige --- drivers/pci/hotplug/sgi_hotplug.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: 20090721/drivers/pci/hotplug/sgi_hotplug.c =================================================================== --- 20090721.orig/drivers/pci/hotplug/sgi_hotplug.c +++ 20090721/drivers/pci/hotplug/sgi_hotplug.c @@ -90,11 +90,10 @@ static struct hotplug_slot_ops sn_hotplu static DEFINE_MUTEX(sn_hotplug_mutex); -static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot, - char *buf) +static ssize_t path_show(struct pci_slot *pci_slot, char *buf) { int retval = -ENOENT; - struct slot *slot = bss_hotplug_slot->private; + struct slot *slot = pci_slot->hotplug->private; if (!slot) return retval; @@ -103,13 +102,7 @@ static ssize_t path_show (struct hotplug return retval; } -struct hotplug_slot_attribute { - struct attribute attr; - ssize_t (*show)(struct hotplug_slot *, char *); - ssize_t (*store)(struct hotplug_slot *, const char *, size_t); -}; - -static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path); +static struct pci_slot_attribute sn_slot_path_attr = __ATTR_RO(path); static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) {