From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ruth.realtime.net (mercury.realtime.net [205.238.132.86]) by ozlabs.org (Postfix) with ESMTP id 027F2DDE44 for ; Wed, 25 Apr 2007 01:45:37 +1000 (EST) Mime-Version: 1.0 (Apple Message framework v624) In-Reply-To: <20070424112530.GA11489@aepfle.de> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: From: Milton Miller Subject: Re: [PATCH] generic check_legacy_ioport Date: Tue, 24 Apr 2007 10:45:22 -0500 To: Olaf Hering Cc: ppcdev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue Apr 24 21:25:30 EST 2007, Olaf Hering wrote: > Thats how it may look finally, currently only compile tested. > > int check_legacy_ioport(unsigned long base_port) > { > struct device_node *parent, *np = NULL; > int ret = -ENODEV; ... > if (np) { > parent = of_get_parent(np); > if (parent) { > ret = strcmp(parent->type, "isa"); This calculates the return as 0 / anything, vs 0 / -ENODEV. > of_node_put(parent); > } > of_node_put(np); > } > return ret; > }