From patchwork Fri Feb 5 13:53:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Boyer X-Patchwork-Id: 44644 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 17A40B84FE for ; Sat, 6 Feb 2010 00:54:12 +1100 (EST) Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.223.172]) by ozlabs.org (Postfix) with ESMTP id 449E9B7E39 for ; Sat, 6 Feb 2010 00:54:04 +1100 (EST) Received: by iwn2 with SMTP id 2so352940iwn.10 for ; Fri, 05 Feb 2010 05:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=JTHC8BE2mimcTPiyXcK8cEYHVpyMYKNWkJFfCQDb55A=; b=tgbRoX0wTzKUfR43EsBB7EEfddcuWRCsgrfHnOO04+aSE9Qy9gW1bD8ZTUlfFkMmXT UZlSopec2vnFNcxL4ReWz+u4hcYL9GasqPr1/8L8NVED2pQk/WU7kjh2EeMZWw3X/kA4 SAltHfzINAVYsROHNYXged3vp3alnnzVoinNA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Vh6AnP5e/51nKzn1EhYGd7VAde7uVSdAurH4AgTrRTu3BiDtsBQZZo3R4mp1G1LFNp i1hp6CA/X1pYCknRfA68X3oZX64lQ/qx7+YrIUfS3F31mOBNaTCvpGByAFursXYPM2ei OEsWT3zQorUup8SkBhSGfBG19K0S3Aeb1ibFs= Received: by 10.231.161.138 with SMTP id r10mr2817541ibx.34.1265378042674; Fri, 05 Feb 2010 05:54:02 -0800 (PST) Received: from hansolo.jdub.homelinux.org (66-227-170-160.dhcp.aldl.mi.charter.com [66.227.170.160]) by mx.google.com with ESMTPS id 22sm1095195iwn.0.2010.02.05.05.54.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Feb 2010 05:54:01 -0800 (PST) Date: Fri, 5 Feb 2010 08:53:54 -0500 From: Josh Boyer To: linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 0/4] Fedora kernel patch review Message-ID: <20100205135354.GI12001@hansolo.jdub.homelinux.org> References: <20100205133552.GF12001@hansolo.jdub.homelinux.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100205133552.GF12001@hansolo.jdub.homelinux.org> User-Agent: Mutt/1.5.19 (2009-01-05) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Provide a modalias entry for VIO devices in sysfs. I believe this was another initrd generation bugfix for anaconda. Signed-off-by: David Woodhouse diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index f988672..12a0851 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c @@ -294,9 +294,27 @@ static ssize_t devspec_show(struct device *dev, return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none"); } +static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + const struct vio_dev *vio_dev = to_vio_dev(dev); + struct device_node *dn; + const char *cp; + + dn = dev->archdata.of_node; + if (!dn) + return -ENODEV; + cp = of_get_property(dn, "compatible", NULL); + if (!cp) + return -ENODEV; + + return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); +} + static struct device_attribute vio_dev_attrs[] = { __ATTR_RO(name), __ATTR_RO(devspec), + __ATTR_RO(modalias), __ATTR_NULL };