Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: 'Stefan Kristiansson' <stefan.kristiansson@saunalahti.fi>
Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	'Tomi Valkeinen' <tomi.valkeinen@ti.com>,
	'Jean-Christophe PLAGNIOL-VILLARD' <plagnioj@jcrosoft.com>,
	'Jingoo Han' <jg1.han@samsung.com>
Subject: Re: [PATCH v2] video: add OpenCores VGA/LCD framebuffer driver
Date: Wed, 20 Nov 2013 06:20:28 +0000	[thread overview]
Message-ID: <000701cee5b8$9b61e3b0$d225ab10$%han@samsung.com> (raw)
In-Reply-To: <1384920820-18740-1-git-send-email-stefan.kristiansson@saunalahti.fi>

On Wednesday, November 20, 2013 1:14 PM, Stefan Kristiansson wrote:
> 
> This adds support for the VGA/LCD core available from OpenCores:
> http://opencores.org/project,vga_lcd
> 
> The driver have been tested together with both OpenRISC and
> ARM (socfpga) processors.
> 
> Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> ---
> Changes in v2:
> - Add Microblaze as an example user and fix a typo in Xilinx Zynq
> ---
>  drivers/video/Kconfig  |  17 ++
>  drivers/video/Makefile |   1 +
>  drivers/video/ocfb.c   | 479 +++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 497 insertions(+)
>  create mode 100644 drivers/video/ocfb.c
> 

Hi Stefan Kristiansson,

I added trivial comments as below.

[.....]

> --- /dev/null
> +++ b/drivers/video/ocfb.c

[.....]

> +static int ocfb_probe(struct platform_device *pdev)
> +{
> +	int ret = 0;
> +	struct ocfb_dev *fbdev;
> +	struct ocfb_par *par = &ocfb_par_priv;
> +	struct resource *res;
> +	struct resource *mmio;
> +	int fbsize;
> +
> +	fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);

Please use devm_kzalloc() instead of kzalloc().
In this case, kfree() can be removed from ocfb_probe()
and ocfb_remove(). Thus, it will make the code smaller.

[.....]

> +
> +#ifdef MODULE

I don't think that '#ifdef MODULE' is necessary.
Is there any reason?

Best regards,
Jingoo Han

> +MODULE_AUTHOR("Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>");
> +MODULE_DESCRIPTION("OpenCores VGA/LCD 2.0 frame buffer driver");
> +MODULE_LICENSE("GPL v2");
> +module_param(mode_option, charp, 0);
> +MODULE_PARM_DESC(mode_option, "Video mode ('<xres>x<yres>[-<bpp>][@refresh]')");
> +#endif
> --
> 1.8.3.2


  reply	other threads:[~2013-11-20  6:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  4:13 [PATCH v2] video: add OpenCores VGA/LCD framebuffer driver Stefan Kristiansson
2013-11-20  6:20 ` Jingoo Han [this message]
2013-11-20 19:13   ` Stefan Kristiansson

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='000701cee5b8$9b61e3b0$d225ab10$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    --cc=tomi.valkeinen@ti.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