linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Valentin <eduardo.valentin@ti.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	Eduardo Valentin <eduardo.valentin@ti.com>
Subject: [PATCH 7/8] stating: ti-soc-thermal: use sizeof(*pointer) while allocating
Date: Mon, 18 Mar 2013 10:59:15 -0400	[thread overview]
Message-ID: <1363618756-15851-8-git-send-email-eduardo.valentin@ti.com> (raw)
In-Reply-To: <1363618756-15851-1-git-send-email-eduardo.valentin@ti.com>

Follow Documentation/CodingStyle and use sizeof(*pointer)
instead of sizeof(struct type).

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c
index b74e847..4382c0c 100644
--- a/drivers/staging/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/staging/ti-soc-thermal/ti-bandgap.c
@@ -902,8 +902,7 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
 		return ERR_PTR(-EINVAL);
 	}
 
-	bgp = devm_kzalloc(&pdev->dev, sizeof(struct ti_bandgap),
-				    GFP_KERNEL);
+	bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL);
 	if (!bgp) {
 		dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
 		return ERR_PTR(-ENOMEM);
-- 
1.7.7.1.488.ge8e1c


  parent reply	other threads:[~2013-03-18 14:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 14:59 [PATCH 0/8] staging: [omap,ti-soc]-thermal: fixes and renaming Eduardo Valentin
2013-03-18 14:59 ` [PATCH 1/8] staging: omap-thermal: fix return value Eduardo Valentin
2013-03-18 16:39   ` Dan Carpenter
2013-03-18 17:20     ` Eduardo Valentin
2013-03-18 14:59 ` [PATCH 2/8] staging: omap-thermal: use spin_lock_irqsave inside IRQ handler Eduardo Valentin
2013-03-18 19:16   ` Dan Carpenter
2013-03-18 19:38     ` Eduardo Valentin
2013-03-18 19:58       ` Dan Carpenter
2013-03-18 14:59 ` [PATCH 3/8] staging: omap-thermal: rename bg_ptr to bgp Eduardo Valentin
2013-03-18 14:59 ` [PATCH 4/8] staging: rename omap-thermal driver to ti-soc-thermal Eduardo Valentin
2013-03-18 19:17   ` Dan Carpenter
2013-03-18 14:59 ` [PATCH 5/8] staging: ti-soc-thermal: make unexported functions local Eduardo Valentin
2013-03-18 14:59 ` [PATCH 6/8] staging: ti-soc-thermal: split writable data from readonly data Eduardo Valentin
2013-03-18 14:59 ` Eduardo Valentin [this message]
2013-03-18 14:59 ` [PATCH 8/8] staging: ti-soc-thermal: fix several kernel-doc warnings and error Eduardo Valentin
2013-03-19 14:36 ` [PATCH 0/8] staging: [omap,ti-soc]-thermal: fixes and renaming Eduardo Valentin

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=1363618756-15851-8-git-send-email-eduardo.valentin@ti.com \
    --to=eduardo.valentin@ti.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /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).