lkml.org 
[lkml]   [2010]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/30] staging/vme: fill in struct device's .release, even if it's a NOOP
Date
From: Emilio G. Cota <cota@braap.org>

Without it we get 32 warnings, one per device being released, when
removing a bridge module.

After applying this patch, bridge modules can at last be removed
without any apparent hiccup.

[Note: tested only on the tsi148, it's the only bridge I've got]

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
drivers/staging/vme/vme.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
index afd2dbd..59650dd 100644
--- a/drivers/staging/vme/vme.c
+++ b/drivers/staging/vme/vme.c
@@ -1352,6 +1352,11 @@ static void vme_free_bus_num(int bus)
mutex_unlock(&vme_bus_num_mtx);
}

+/* Note: device_release(dev) throws a warning if dev->release isn't filled in */
+static void vme_dev_release(struct device *dev)
+{
+}
+
int vme_register_bridge(struct vme_bridge *bridge)
{
struct device *dev;
@@ -1372,6 +1377,7 @@ int vme_register_bridge(struct vme_bridge *bridge)

dev->parent = bridge->parent;
dev->bus = &vme_bus_type;
+ dev->release = vme_dev_release;
/*
* We save a pointer to the bridge in platform_data so that we
* can get to it later. We keep driver_data for use by the
--
1.7.1


\
 
 \ /
  Last update: 2010-10-26 03:19    [W:0.336 / U:4.172 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site