mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>, linux-arm-kernel@lists.infradead.org
Cc: vishnupatekar <vishnupatekar0510@gmail.com>,
	maxime.ripard@free-electrons.com, linux-sunxi@googlegroups.com,
	devicetree@vger.kernel.org, benh@kernel.crashing.org,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	ralf@linux-mips.org, robh+dt@kernel.org, msalter@redhat.com,
	vishnupatekar <VishnuPatekar0510@gmail.com>,
	jdelvare@suse.de
Subject: Re: [PATCH 2/3] drivers:input:ps2 Added sunxi A20 ps2 driver, changed makefile and Kconfig
Date: Fri, 05 Dec 2014 07:01:17 -0800	[thread overview]
Message-ID: <63D786FF-B293-4FC1-AD71-D99515DE8E3D@gmail.com> (raw)
In-Reply-To: <12237550.afophX20rO@wuerfel>

Hi Arnd,

On December 5, 2014 2:33:11 AM PST, Arnd Bergmann <arnd@arndb.de> wrote:
>On Thursday 04 December 2014 04:23:44 vishnupatekar wrote:
>> +
>> +struct sunxips2data {
>> +	int irq;
>> +	spinlock_t ps2_lock;
>> +	void __iomem *base_address;	/* virt address of control registers*/
>> +	struct serio *serio;		/* serio*/
>> +	struct device *dev;
>> +	struct	clk	*pclk;
>> +};
>
>As this is dynamically allocated, better embed the serio member
>directly to avoid allocating both separately.

That would be wrong - serio is refcounted and it may outlive instance of sunxips2data you embedded it into.


Thanks.

-- 
Dmitry

  reply	other threads:[~2014-12-05 15:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03 22:53 vishnupatekar
2014-12-03 23:23 ` Dmitry Torokhov
2014-12-05 10:01 ` Maxime Ripard
2014-12-05 10:33 ` Arnd Bergmann
2014-12-05 15:01   ` Dmitry Torokhov [this message]
2014-12-05 15:50     ` Arnd Bergmann
2014-12-05 15:53       ` Dmitry Torokhov

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=63D786FF-B293-4FC1-AD71-D99515DE8E3D@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=msalter@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=robh+dt@kernel.org \
    --cc=vishnupatekar0510@gmail.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

all inboxes | Powered by JetHome®