* [GIT PATCH] driver core patches for 2.6.31-rc2-git
@ 2009-07-12 22:37 Greg KH
2009-07-12 22:45 ` [PATCH 1/9] devres: WARN() and return, don't crash on device_del() of uninitialized device Greg Kroah-Hartman
` (8 more replies)
0 siblings, 9 replies; 14+ messages in thread
From: Greg KH @ 2009-07-12 22:37 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel
Here are some driver core patches for your tree.
All tiny stuff, fixing bugs, and finally removing the BUS_ID_SIZE define
that no longer is in use.
All of the non-driver-core touching patches have been sent to the
various subsystem maintainers and gotten acks for them with the
exception of the sparc change, which for some reason did not get an ack,
but was ignored. As the patch is only hard coding the BUS_ID_SIZE
value, no functionalty is changed in the code at all.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git/
All of these patches have been in the linux-next and mm trees for a
while.
The patches will be sent as a follow-on to this message to lkml for people
to see.
thanks,
greg k-h
------------
Documentation/driver-model/driver.txt | 4 ++--
arch/sparc/kernel/vio.c | 7 ++++++-
drivers/base/devres.c | 3 +++
drivers/base/firmware_class.c | 6 ++++--
drivers/power/wm97xx_battery.c | 4 ++--
drivers/video/omap/omapfb_main.c | 14 +++++++-------
fs/partitions/check.c | 2 +-
include/linux/device.h | 2 --
sound/soc/codecs/wm8988.c | 4 ++--
9 files changed, 27 insertions(+), 19 deletions(-)
---------------
Alexander Beregalov (1):
wm97xx_batery: replace driver_data with dev_get_drvdata()
Benjamin Herrenschmidt (1):
devres: WARN() and return, don't crash on device_del() of uninitialized device
Greg Kroah-Hartman (2):
Sound: remove direct access of driver_data
omap: video: remove direct access of driver_data
Heiko Carstens (1):
partitions: fix broken uevent_suppress conversion
Jiri Slaby (1):
Firmware: firmware_class, fix lock imbalance
Kay Sievers (2):
sparc: remove driver-core BUS_ID_SIZE
Driver Core: remove BUS_ID_SIZE
vibi sreenivasan (1):
driver model: fix show/store prototypes in doc.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/9] devres: WARN() and return, don't crash on device_del() of uninitialized device
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
@ 2009-07-12 22:45 ` Greg Kroah-Hartman
2009-07-15 4:16 ` Tejun Heo
2009-07-12 22:45 ` [PATCH 2/9] partitions: fix broken uevent_suppress conversion Greg Kroah-Hartman
` (7 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Benjamin Herrenschmidt, Kay Sievers, Tejun Heo, Andrew Morton,
Greg Kroah-Hartman
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
I just debugged an obscure crash caused by a device_del() of a all NULL'd
out struct device (in usb-serial) and found that a patch like this one would
have saved me time (in addition to improved chances of a bug report from
users hitting similar driver bugs).
[akpm@linux-foundation.org: cleanup]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/base/devres.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index e8beb8e..05dd307 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -428,6 +428,9 @@ int devres_release_all(struct device *dev)
{
unsigned long flags;
+ /* Looks like an uninitialized device structure */
+ if (WARN_ON(dev->devres_head.next == NULL))
+ return -ENODEV;
spin_lock_irqsave(&dev->devres_lock, flags);
return release_nodes(dev, dev->devres_head.next, &dev->devres_head,
flags);
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/9] partitions: fix broken uevent_suppress conversion
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
2009-07-12 22:45 ` [PATCH 1/9] devres: WARN() and return, don't crash on device_del() of uninitialized device Greg Kroah-Hartman
@ 2009-07-12 22:45 ` Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 3/9] sparc: remove driver-core BUS_ID_SIZE Greg Kroah-Hartman
` (6 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Heiko Carstens, stable, Greg Kroah-Hartman
From: Heiko Carstens <heiko.carstens@de.ibm.com>
git commit f67f129e "Driver core: implement uevent suppress in kobject"
contains this chunk for fs/partitions/check.c:
/* suppress uevent if the disk supresses it */
- if (!ddev->uevent_suppress)
+ if (!dev_get_uevent_suppress(pdev))
kobject_uevent(&pdev->kobj, KOBJ_ADD);
However that should have been
- if (!ddev->uevent_suppress)
+ if (!dev_get_uevent_suppress(ddev))
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Ming Lei <tom.leiming@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/partitions/check.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index 1a9c787..ea4e6cb 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -436,7 +436,7 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
rcu_assign_pointer(ptbl->part[partno], p);
/* suppress uevent if the disk supresses it */
- if (!dev_get_uevent_suppress(pdev))
+ if (!dev_get_uevent_suppress(ddev))
kobject_uevent(&pdev->kobj, KOBJ_ADD);
return p;
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/9] sparc: remove driver-core BUS_ID_SIZE
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
2009-07-12 22:45 ` [PATCH 1/9] devres: WARN() and return, don't crash on device_del() of uninitialized device Greg Kroah-Hartman
2009-07-12 22:45 ` [PATCH 2/9] partitions: fix broken uevent_suppress conversion Greg Kroah-Hartman
@ 2009-07-12 22:46 ` Greg Kroah-Hartman
2009-07-13 1:20 ` David Miller
2009-07-12 22:46 ` [PATCH 4/9] Driver Core: remove BUS_ID_SIZE Greg Kroah-Hartman
` (5 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Kay Sievers, David S. Miller, Greg Kroah-Hartman
From: Kay Sievers <kay.sievers@vrfy.org>
The name size limit is gone from the driver-core, the BUS_ID_SIZE
value will be removed.
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sparc/kernel/vio.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
index 753d128..c28c714 100644
--- a/arch/sparc/kernel/vio.c
+++ b/arch/sparc/kernel/vio.c
@@ -224,7 +224,12 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
if (!strcmp(type, "domain-services-port"))
bus_id_name = "ds";
- if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) {
+ /*
+ * 20 char is the old driver-core name size limit, which is no more.
+ * This check can probably be removed after review and possible
+ * adaption of the vio users name length handling.
+ */
+ if (strlen(bus_id_name) >= 20 - 4) {
printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n",
bus_id_name);
return NULL;
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/9] Driver Core: remove BUS_ID_SIZE
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
` (2 preceding siblings ...)
2009-07-12 22:46 ` [PATCH 3/9] sparc: remove driver-core BUS_ID_SIZE Greg Kroah-Hartman
@ 2009-07-12 22:46 ` Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 5/9] Firmware: firmware_class, fix lock imbalance Greg Kroah-Hartman
` (4 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Kay Sievers, Greg Kroah-Hartman
From: Kay Sievers <kay.sievers@vrfy.org>
The name size limit is gone from the driver-core, this is
the removal of the last left-over.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/device.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index ed4e39f..aebb810 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -25,8 +25,6 @@
#include <asm/atomic.h>
#include <asm/device.h>
-#define BUS_ID_SIZE 20
-
struct device;
struct device_private;
struct device_driver;
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/9] Firmware: firmware_class, fix lock imbalance
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
` (3 preceding siblings ...)
2009-07-12 22:46 ` [PATCH 4/9] Driver Core: remove BUS_ID_SIZE Greg Kroah-Hartman
@ 2009-07-12 22:46 ` Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 6/9] driver model: fix show/store prototypes in doc Greg Kroah-Hartman
` (3 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Jiri Slaby, Greg Kroah-Hartman
From: Jiri Slaby <jirislaby@gmail.com>
Add omitted unlock in firmware_data_read.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/base/firmware_class.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index fc46653..f285f44 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -217,8 +217,10 @@ firmware_data_read(struct kobject *kobj, struct bin_attribute *bin_attr,
ret_count = -ENODEV;
goto out;
}
- if (offset > fw->size)
- return 0;
+ if (offset > fw->size) {
+ ret_count = 0;
+ goto out;
+ }
if (count > fw->size - offset)
count = fw->size - offset;
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/9] driver model: fix show/store prototypes in doc.
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
` (4 preceding siblings ...)
2009-07-12 22:46 ` [PATCH 5/9] Firmware: firmware_class, fix lock imbalance Greg Kroah-Hartman
@ 2009-07-12 22:46 ` Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 7/9] Sound: remove direct access of driver_data Greg Kroah-Hartman
` (2 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:46 UTC (permalink / raw)
To: linux-kernel; +Cc: vibi sreenivasan, Randy Dunlap, Greg Kroah-Hartman
From: vibi sreenivasan <vibi_sreenivasan@cms.com>
FIX prototypes for show & store method in struct driver_attribute
Signed-off-by: vibi sreenivasan <vibi_sreenivasan@cms.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
Documentation/driver-model/driver.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/driver-model/driver.txt b/Documentation/driver-model/driver.txt
index 8213216..60120fb 100644
--- a/Documentation/driver-model/driver.txt
+++ b/Documentation/driver-model/driver.txt
@@ -207,8 +207,8 @@ Attributes
~~~~~~~~~~
struct driver_attribute {
struct attribute attr;
- ssize_t (*show)(struct device_driver *, char * buf, size_t count, loff_t off);
- ssize_t (*store)(struct device_driver *, const char * buf, size_t count, loff_t off);
+ ssize_t (*show)(struct device_driver *driver, char *buf);
+ ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
};
Device drivers can export attributes via their sysfs directories.
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 7/9] Sound: remove direct access of driver_data
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
` (5 preceding siblings ...)
2009-07-12 22:46 ` [PATCH 6/9] driver model: fix show/store prototypes in doc Greg Kroah-Hartman
@ 2009-07-12 22:46 ` Greg Kroah-Hartman
2009-07-13 9:44 ` Mark Brown
2009-07-12 22:46 ` [PATCH 8/9] omap: video: " Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 9/9] wm97xx_batery: replace driver_data with dev_get_drvdata() Greg Kroah-Hartman
8 siblings, 1 reply; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:46 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Takashi Iwai, Jaroslav Kysela, Liam Girdwood
This is the last in-kernel direct usage of driver_data, replace it with
the proper dev_get/set_drvdata() calls.
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/soc/codecs/wm8988.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index c05f718..8c0fdf8 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -1037,14 +1037,14 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi)
codec->control_data = spi;
codec->dev = &spi->dev;
- spi->dev.driver_data = wm8988;
+ dev_set_drvdata(&spi->dev, wm8988);
return wm8988_register(wm8988);
}
static int __devexit wm8988_spi_remove(struct spi_device *spi)
{
- struct wm8988_priv *wm8988 = spi->dev.driver_data;
+ struct wm8988_priv *wm8988 = dev_get_drvdata(&spi->dev);
wm8988_unregister(wm8988);
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 8/9] omap: video: remove direct access of driver_data
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
` (6 preceding siblings ...)
2009-07-12 22:46 ` [PATCH 7/9] Sound: remove direct access of driver_data Greg Kroah-Hartman
@ 2009-07-12 22:46 ` Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 9/9] wm97xx_batery: replace driver_data with dev_get_drvdata() Greg Kroah-Hartman
8 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:46 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Imre Deak, Russell King, Andrew Morton,
Tony Lindgren, Felipe Contreras
dev_set/get_drvdata() should be used instead, as driver_data is going
away.
Cc: Imre Deak <imre.deak@nokia.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Trilok Soni <soni.trilok@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Contreras <felipe.contreras@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/video/omap/omapfb_main.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 4ea99bf..8862233 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -1254,7 +1254,7 @@ static struct fb_ops omapfb_ops = {
static ssize_t omapfb_show_caps_num(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data;
+ struct omapfb_device *fbdev = dev_get_drvdata(dev);
int plane;
size_t size;
struct omapfb_caps caps;
@@ -1274,7 +1274,7 @@ static ssize_t omapfb_show_caps_num(struct device *dev,
static ssize_t omapfb_show_caps_text(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data;
+ struct omapfb_device *fbdev = dev_get_drvdata(dev);
int i;
struct omapfb_caps caps;
int plane;
@@ -1321,7 +1321,7 @@ static DEVICE_ATTR(caps_text, 0444, omapfb_show_caps_text, NULL);
static ssize_t omapfb_show_panel_name(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data;
+ struct omapfb_device *fbdev = dev_get_drvdata(dev);
return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->panel->name);
}
@@ -1330,7 +1330,7 @@ static ssize_t omapfb_show_bklight_level(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data;
+ struct omapfb_device *fbdev = dev_get_drvdata(dev);
int r;
if (fbdev->panel->get_bklight_level) {
@@ -1345,7 +1345,7 @@ static ssize_t omapfb_store_bklight_level(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
- struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data;
+ struct omapfb_device *fbdev = dev_get_drvdata(dev);
int r;
if (fbdev->panel->set_bklight_level) {
@@ -1364,7 +1364,7 @@ static ssize_t omapfb_store_bklight_level(struct device *dev,
static ssize_t omapfb_show_bklight_max(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data;
+ struct omapfb_device *fbdev = dev_get_drvdata(dev);
int r;
if (fbdev->panel->get_bklight_level) {
@@ -1397,7 +1397,7 @@ static struct attribute_group panel_attr_grp = {
static ssize_t omapfb_show_ctrl_name(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct omapfb_device *fbdev = (struct omapfb_device *)dev->driver_data;
+ struct omapfb_device *fbdev = dev_get_drvdata(dev);
return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->ctrl->name);
}
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 9/9] wm97xx_batery: replace driver_data with dev_get_drvdata()
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
` (7 preceding siblings ...)
2009-07-12 22:46 ` [PATCH 8/9] omap: video: " Greg Kroah-Hartman
@ 2009-07-12 22:46 ` Greg Kroah-Hartman
8 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2009-07-12 22:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Beregalov, Greg Kroah-Hartman
From: Alexander Beregalov <a.beregalov@gmail.com>
direct access of driver_data is going away.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/power/wm97xx_battery.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c
index 8bde921..b787335 100644
--- a/drivers/power/wm97xx_battery.c
+++ b/drivers/power/wm97xx_battery.c
@@ -33,14 +33,14 @@ static enum power_supply_property *prop;
static unsigned long wm97xx_read_bat(struct power_supply *bat_ps)
{
- return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
+ return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent),
pdata->batt_aux) * pdata->batt_mult /
pdata->batt_div;
}
static unsigned long wm97xx_read_temp(struct power_supply *bat_ps)
{
- return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
+ return wm97xx_read_aux_adc(dev_get_drvdata(bat_ps->dev->parent),
pdata->temp_aux) * pdata->temp_mult /
pdata->temp_div;
}
--
1.6.3.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/9] sparc: remove driver-core BUS_ID_SIZE
2009-07-12 22:46 ` [PATCH 3/9] sparc: remove driver-core BUS_ID_SIZE Greg Kroah-Hartman
@ 2009-07-13 1:20 ` David Miller
0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2009-07-13 1:20 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, kay.sievers
From: Greg Kroah-Hartman <gregkh@suse.de>
Date: Sun, 12 Jul 2009 15:46:00 -0700
> From: Kay Sievers <kay.sievers@vrfy.org>
>
> The name size limit is gone from the driver-core, the BUS_ID_SIZE
> value will be removed.
>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 7/9] Sound: remove direct access of driver_data
2009-07-12 22:46 ` [PATCH 7/9] Sound: remove direct access of driver_data Greg Kroah-Hartman
@ 2009-07-13 9:44 ` Mark Brown
2009-07-14 3:59 ` Greg KH
0 siblings, 1 reply; 14+ messages in thread
From: Mark Brown @ 2009-07-13 9:44 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood
On Sun, Jul 12, 2009 at 03:46:04PM -0700, Greg Kroah-Hartman wrote:
> This is the last in-kernel direct usage of driver_data, replace it with
> the proper dev_get/set_drvdata() calls.
Any objections to me applying this to ASoC, and if so do you want it in
2.6.31?
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: Liam Girdwood <lrg@slimlogic.co.uk>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> ---
> sound/soc/codecs/wm8988.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
> index c05f718..8c0fdf8 100644
> --- a/sound/soc/codecs/wm8988.c
> +++ b/sound/soc/codecs/wm8988.c
> @@ -1037,14 +1037,14 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi)
> codec->control_data = spi;
> codec->dev = &spi->dev;
>
> - spi->dev.driver_data = wm8988;
> + dev_set_drvdata(&spi->dev, wm8988);
>
> return wm8988_register(wm8988);
> }
>
> static int __devexit wm8988_spi_remove(struct spi_device *spi)
> {
> - struct wm8988_priv *wm8988 = spi->dev.driver_data;
> + struct wm8988_priv *wm8988 = dev_get_drvdata(&spi->dev);
>
> wm8988_unregister(wm8988);
>
> --
> 1.6.3.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
"You grabbed my hand and we fell into it, like a daydream - or a fever."
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 7/9] Sound: remove direct access of driver_data
2009-07-13 9:44 ` Mark Brown
@ 2009-07-14 3:59 ` Greg KH
0 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2009-07-14 3:59 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, Takashi Iwai, Jaroslav Kysela, Liam Girdwood
On Mon, Jul 13, 2009 at 10:44:01AM +0100, Mark Brown wrote:
> On Sun, Jul 12, 2009 at 03:46:04PM -0700, Greg Kroah-Hartman wrote:
> > This is the last in-kernel direct usage of driver_data, replace it with
> > the proper dev_get/set_drvdata() calls.
>
> Any objections to me applying this to ASoC, and if so do you want it in
> 2.6.31?
It's in Linus's tree now, so no need for you to do it :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/9] devres: WARN() and return, don't crash on device_del() of uninitialized device
2009-07-12 22:45 ` [PATCH 1/9] devres: WARN() and return, don't crash on device_del() of uninitialized device Greg Kroah-Hartman
@ 2009-07-15 4:16 ` Tejun Heo
0 siblings, 0 replies; 14+ messages in thread
From: Tejun Heo @ 2009-07-15 4:16 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Benjamin Herrenschmidt, Kay Sievers, Andrew Morton
Greg Kroah-Hartman wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> I just debugged an obscure crash caused by a device_del() of a all NULL'd
> out struct device (in usb-serial) and found that a patch like this one would
> have saved me time (in addition to improved chances of a bug report from
> users hitting similar driver bugs).
>
> [akpm@linux-foundation.org: cleanup]
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Kay Sievers <kay.sievers@vrfy.org>
> Cc: Tejun Heo <tj@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
--
tejun
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2009-07-15 4:16 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-12 22:37 [GIT PATCH] driver core patches for 2.6.31-rc2-git Greg KH
2009-07-12 22:45 ` [PATCH 1/9] devres: WARN() and return, don't crash on device_del() of uninitialized device Greg Kroah-Hartman
2009-07-15 4:16 ` Tejun Heo
2009-07-12 22:45 ` [PATCH 2/9] partitions: fix broken uevent_suppress conversion Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 3/9] sparc: remove driver-core BUS_ID_SIZE Greg Kroah-Hartman
2009-07-13 1:20 ` David Miller
2009-07-12 22:46 ` [PATCH 4/9] Driver Core: remove BUS_ID_SIZE Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 5/9] Firmware: firmware_class, fix lock imbalance Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 6/9] driver model: fix show/store prototypes in doc Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 7/9] Sound: remove direct access of driver_data Greg Kroah-Hartman
2009-07-13 9:44 ` Mark Brown
2009-07-14 3:59 ` Greg KH
2009-07-12 22:46 ` [PATCH 8/9] omap: video: " Greg Kroah-Hartman
2009-07-12 22:46 ` [PATCH 9/9] wm97xx_batery: replace driver_data with dev_get_drvdata() Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox