linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@tabi.org>
To: Jason Jin <Jason.Jin@freescale.com>
Cc: b07421@freescale.com, linux-fbdev@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, r58472@freescale.com,
	Wang Dongsheng <dongsheng.wang@freescale.com>
Subject: Re: [PATCH 2/2] video/fsl: Fix the sleep function for FSL DIU module
Date: Wed, 26 Mar 2014 13:50:16 -0500	[thread overview]
Message-ID: <53332168.5050805@tabi.org> (raw)
In-Reply-To: <1395855704-19908-2-git-send-email-Jason.Jin@freescale.com>

On 03/26/2014 12:41 PM, Jason Jin wrote:
> +	if (!diu_ops.set_pixel_clock) {
> +		data->saved_pixel_clock = 0;
> +		if (of_address_to_resource(ofdev->dev.of_node, 1, &res))
> +			pr_err(KERN_ERR "No pixel clock set func and no pixel node!\n");
> +		else {
> +			data->pixelclk_ptr =
> +				devm_ioremap(&ofdev->dev, res.start, resource_size(&res));
> +			if (!data->pixelclk_ptr) {
> +				pr_err(KERN_ERR "fslfb: could not map pixelclk register!\n");
> +				ret = -ENOMEM;
> +			} else
> +				data->saved_pixel_clock = in_be32(data->pixelclk_ptr);
> +		}
> +	}

This seems very hackish.  What node does ofdev point to?  I wonder if 
this code should be in the platform file instead.

Also, use dev_info() instead of pr_err, and never use exclamation marks 
in driver messages.

  reply	other threads:[~2014-03-26 18:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 17:41 [PATCH 1/2] video/fsl: make the diu driver work without platform hooks Jason Jin
2014-03-26 17:41 ` [PATCH 2/2] video/fsl: Fix the sleep function for FSL DIU module Jason Jin
2014-03-26 18:50   ` Timur Tabi [this message]
2014-03-27  3:42     ` Jason.Jin
2014-03-27  3:46       ` Timur Tabi
2014-03-27  3:57         ` Jason.Jin
2014-03-26 18:46 ` [PATCH 1/2] video/fsl: make the diu driver work without platform hooks Timur Tabi
2014-03-27  3:30   ` Jason.Jin
2014-03-27  3:35     ` Timur Tabi
2014-03-27  3:38       ` Jason.Jin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53332168.5050805@tabi.org \
    --to=timur@tabi.org \
    --cc=Jason.Jin@freescale.com \
    --cc=b07421@freescale.com \
    --cc=dongsheng.wang@freescale.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=r58472@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).