mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linus.walleij@stericsson.com,
	jamie@jamieiles.com, arnd@arndb.de
Subject: Re: [PATCH 2/6] drivers/base: add bus for System-on-Chip devices
Date: Mon, 17 Oct 2011 09:18:54 -0700	[thread overview]
Message-ID: <20111017161854.GB5108@suse.de> (raw)
In-Reply-To: <1318852378-14180-3-git-send-email-lee.jones@linaro.org>

On Mon, Oct 17, 2011 at 12:52:54PM +0100, Lee Jones wrote:
> +void soc_device_unregister(struct device *dev)

Ick, no, pass in the struct soc_device, which the register function
should return, not a "raw" struct device.


> +{
> +	struct soc_device *soc_dev =
> +		container_of(dev, struct soc_device, dev);
> +
> +	sysfs_remove_group(&dev->kobj, &soc_attr_group);
> +
> +	if (device_is_registered(dev))
> +		device_unregister(dev);

Why is this call needed?

> +
> +	bus_unregister(&soc_bus_type);

What happens if you have more than one SOC device?  I think you just
oopsed.

> +
> +	kfree(soc_dev->attr);
> +	kfree(soc_dev);

Nope, you just failed again.  I can tell you never tried this code path,
otherwise you would have noticed the HUGE warnings that the kernel spit
back at you.  Please fix this.

greg k-h

  parent reply	other threads:[~2011-10-17 16:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 11:52 [PATCH 0/6] ux500: Export SoC information and some platform clean-up Lee Jones
2011-10-17 11:52 ` [PATCH 1/6] mach-ux500: pass parent pointer to each platform device Lee Jones
2011-10-17 11:52 ` [PATCH 2/6] drivers/base: add bus for System-on-Chip devices Lee Jones
2011-10-17 12:13   ` Jamie Iles
2011-10-17 16:16   ` Greg KH
2011-10-17 18:03     ` Arnd Bergmann
2011-10-17 18:25       ` Greg KH
2011-10-18 14:00         ` Arnd Bergmann
2011-10-18 14:44           ` Greg KH
2011-10-18 11:12     ` Lee Jones
2011-10-18 14:14       ` Arnd Bergmann
2011-10-18 14:41         ` Greg KH
2011-10-18 14:43       ` Greg KH
2011-10-17 16:18   ` Greg KH [this message]
2011-10-18 11:14     ` Lee Jones
2011-10-18 14:05       ` Arnd Bergmann
2011-10-18 14:15         ` Jamie Iles
2011-10-18 14:38           ` Greg KH
2011-10-18 14:53           ` Arnd Bergmann
2011-10-18 14:56             ` Jamie Iles
2011-10-17 11:52 ` [PATCH 3/6] Documentation: add information for new sysfs soc bus functionality Lee Jones
2011-10-17 11:52 ` [PATCH 4/6] mach-ux500: export System-on-Chip information ux500 via sysfs Lee Jones
2011-10-17 11:52 ` [PATCH 5/6] mach-ux500: move top level platform devices in sysfs to /sys/devices/socX Lee Jones
2011-10-17 11:52 ` [PATCH 6/6] mach-ux500: remove intermediary add_platform_device* functions Lee Jones
2011-10-17 11:59   ` Jamie Iles
2011-10-19 14:43     ` Lee Jones
2011-10-19 14:45       ` Jamie Iles

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=20111017161854.GB5108@suse.de \
    --to=gregkh@suse.de \
    --cc=arnd@arndb.de \
    --cc=jamie@jamieiles.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@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

Powered by JetHome