From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx38.mail.ru (mx38.mail.ru [194.67.23.16]) by ozlabs.org (Postfix) with ESMTP id C6846DDE41 for ; Sat, 27 Oct 2007 20:47:51 +1000 (EST) Date: Sat, 27 Oct 2007 14:46:07 +0400 From: Anton Vorontsov To: Scott Wood Subject: Re: [PATCH 6/7] mpc83xx: timer driver for PM wakeup Message-ID: <20071027104607.GA2303@zarina> References: <20071023212404.GA30942@loki.buserror.net> <20071023212502.GE30959@loki.buserror.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 In-Reply-To: <20071023212502.GE30959@loki.buserror.net> Cc: linuxppc-dev@ozlabs.org, paulus@samba.org Reply-To: cbou@mail.ru List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Scott, On Tue, Oct 23, 2007 at 04:25:02PM -0500, Scott Wood wrote: > This is a driver for the mpc83xx's GTM4 timer. It's functionality > is limited to providing a wakeup source for suspend-to-RAM. > > Signed-off-by: Scott Wood I think you can use dev_err(&dev->dev > +static int __devinit gtm_probe(struct of_device *dev, > + const struct of_device_id *match) > +{ > + struct device_node *np = dev->node; > + struct resource res; > + int ret = 0; > + u32 busfreq = fsl_get_sys_freq(); > + struct gtm_priv *priv; > + > + if (busfreq == 0) { > + printk(KERN_ERR "gtm: No bus frequency in device tree.\n"); here > + return -ENODEV; > + } > + > + priv = kmalloc(sizeof(struct gtm_priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + spin_lock_init(&priv->lock); > + dev_set_drvdata(&dev->dev, priv); > + > + ret = of_address_to_resource(np, 0, &res); > + if (ret) > + goto out; > + > + priv->irq = irq_of_parse_and_map(np, 0); > + if (priv->irq == NO_IRQ) { > + printk(KERN_ERR "mpc83xx-gtm exists in device tree " > + "without an IRQ.\n"); and here. Thanks, -- Anton Vorontsov email: cbou@mail.ru backup email: ya-cbou@yandex.ru irc://irc.freenode.net/bd2