mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Adding dummy release functions to avoid warnings.
@ 2008-04-16  0:34 Vitaliy Ivanov
  2008-06-05  9:39 ` [PATCH resend] " Vitaliy Ivanov
  0 siblings, 1 reply; 5+ messages in thread
From: Vitaliy Ivanov @ 2008-04-16  0:34 UTC (permalink / raw)
  To: linux-kernel, devzero, jsun, dwmw2


Subject: [PATCH] Adding dummy release functions to avoid warnings.

From: Vitaliy Ivanov <vitalivanov@gmail.com>

Trivial fix for #9690.
Added simple release functions that doing nothing.
Not sure whether we can leave it as is or to rework using platform_device helpers like platform_device_alloc.
This approach is used in many drivers.


Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>

--

 drivers/mtd/maps/physmap.c |    6 ++++++
 drivers/video/hgafb.c      |   10 +++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index bc4649a..5bdbd04 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -264,11 +264,17 @@ static struct resource physmap_flash_resource = {
 	.flags		= IORESOURCE_MEM,
 };
 
+/* Fake release func.*/
+static void physmap_flash_release(struct device *dev)
+{
+}
+
 static struct platform_device physmap_flash = {
 	.name		= "physmap-flash",
 	.id		= 0,
 	.dev		= {
 		.platform_data	= &physmap_flash_data,
+		.release	= physmap_flash_release, 
 	},
 	.num_resources	= 1,
 	.resource	= &physmap_flash_resource,
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index fb9e672..8707115 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -623,8 +623,16 @@ static struct device_driver hgafb_driver = {
 	.remove = hgafb_remove,
 };
 
+/* Fake release func.*/
+static void hgafb_device_release(struct device *dev)
+{
+}
+
 static struct platform_device hgafb_device = {
-	.name = "hgafb",
+	.name	= "hgafb",
+	.dev	= {
+		.release = hgafb_device_release, 
+	},
 };
 
 static int __init hgafb_init(void)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH resend] Adding dummy release functions to avoid warnings.
  2008-04-16  0:34 [PATCH] Adding dummy release functions to avoid warnings Vitaliy Ivanov
@ 2008-06-05  9:39 ` Vitaliy Ivanov
  2008-06-05 16:07   ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Vitaliy Ivanov @ 2008-06-05  9:39 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: lkml, devzero, jsun, dwmw2, protasnb

Hi all,

Natalie reported that patch wasn't accepted.
Please check this out. If I need to correct it somehow then pls let me know.

V.

---------- Forwarded message ----------
From: Vitaliy Ivanov <vitalivanov@gmail.com>
Date: Wed, Apr 16, 2008 at 3:34 AM
Subject: [PATCH] Adding dummy release functions to avoid warnings.
To: linux-kernel@vger.kernel.org, devzero@web.de, jsun@junsun.net,
dwmw2@infradead.org



Subject: [PATCH] Adding dummy release functions to avoid warnings.

From: Vitaliy Ivanov <vitalivanov@gmail.com>

Trivial fix for #9690.
Added simple release functions that doing nothing.
Not sure whether we can leave it as is or to rework using
platform_device helpers like platform_device_alloc.
This approach is used in many drivers.


Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>

--

 drivers/mtd/maps/physmap.c |    6 ++++++
 drivers/video/hgafb.c      |   10 +++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index bc4649a..5bdbd04 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -264,11 +264,17 @@ static struct resource physmap_flash_resource = {
       .flags          = IORESOURCE_MEM,
 };

+/* Fake release func.*/
+static void physmap_flash_release(struct device *dev)
+{
+}
+
 static struct platform_device physmap_flash = {
       .name           = "physmap-flash",
       .id             = 0,
       .dev            = {
               .platform_data  = &physmap_flash_data,
+               .release        = physmap_flash_release,
       },
       .num_resources  = 1,
       .resource       = &physmap_flash_resource,
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index fb9e672..8707115 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -623,8 +623,16 @@ static struct device_driver hgafb_driver = {
       .remove = hgafb_remove,
 };

+/* Fake release func.*/
+static void hgafb_device_release(struct device *dev)
+{
+}
+
 static struct platform_device hgafb_device = {
-       .name = "hgafb",
+       .name   = "hgafb",
+       .dev    = {
+               .release = hgafb_device_release,
+       },
 };

 static int __init hgafb_init(void)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH resend] Adding dummy release functions to avoid warnings.
  2008-06-05  9:39 ` [PATCH resend] " Vitaliy Ivanov
@ 2008-06-05 16:07   ` Andrew Morton
  2008-06-05 16:31     ` David Woodhouse
  2008-06-05 16:32     ` Vitaliy Ivanov
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Morton @ 2008-06-05 16:07 UTC (permalink / raw)
  To: Vitaliy Ivanov
  Cc: torvalds, lkml, devzero, jsun, dwmw2, protasnb, linux-fbdev-devel

On Thu, 5 Jun 2008 12:39:46 +0300 "Vitaliy Ivanov" <vitalivanov@gmail.com> wrote:

> Hi all,
> 
> Natalie reported that patch wasn't accepted.
> Please check this out. If I need to correct it somehow then pls let me know.
> 
> V.
> 
> ---------- Forwarded message ----------
> From: Vitaliy Ivanov <vitalivanov@gmail.com>
> Date: Wed, Apr 16, 2008 at 3:34 AM
> Subject: [PATCH] Adding dummy release functions to avoid warnings.
> To: linux-kernel@vger.kernel.org, devzero@web.de, jsun@junsun.net,
> dwmw2@infradead.org
> 
> 
> 
> Subject: [PATCH] Adding dummy release functions to avoid warnings.
> 
> From: Vitaliy Ivanov <vitalivanov@gmail.com>
> 
> Trivial fix for #9690.
> Added simple release functions that doing nothing.
> Not sure whether we can leave it as is or to rework using
> platform_device helpers like platform_device_alloc.

Please see Documentation/kobject.txt - search for the text
"mocked mercilessly" :)

> This approach is used in many drivers.
> --
> 
>  drivers/mtd/maps/physmap.c |    6 ++++++

Let's mock David too!

>  drivers/video/hgafb.c      |   10 +++++++++-

I expect that
hgafb-convert-to-new-platform-driver-api-bugzilla-9689.patch which I
merged yesterday will help here.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH resend] Adding dummy release functions to avoid warnings.
  2008-06-05 16:07   ` Andrew Morton
@ 2008-06-05 16:31     ` David Woodhouse
  2008-06-05 16:32     ` Vitaliy Ivanov
  1 sibling, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2008-06-05 16:31 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Vitaliy Ivanov, torvalds, lkml, devzero, jsun, protasnb,
	linux-fbdev-devel

On Thu, 2008-06-05 at 09:07 -0700, Andrew Morton wrote:

> Please see Documentation/kobject.txt - search for the text
> "mocked mercilessly" :)

> > 
> >  drivers/mtd/maps/physmap.c |    6 ++++++
> 
> Let's mock David too!

Do not taunt Happy Fun Dave.

-- 
dwmw2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH resend] Adding dummy release functions to avoid warnings.
  2008-06-05 16:07   ` Andrew Morton
  2008-06-05 16:31     ` David Woodhouse
@ 2008-06-05 16:32     ` Vitaliy Ivanov
  1 sibling, 0 replies; 5+ messages in thread
From: Vitaliy Ivanov @ 2008-06-05 16:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: torvalds, lkml, devzero, jsun, dwmw2, protasnb, linux-fbdev-devel

Andrew,

On Thu, 2008-06-05 at 19:07, Andrew Morton wrote:
> On Thu, 5 Jun 2008 12:39:46 +0300 "Vitaliy Ivanov" <vitalivanov@gmail.com> wrote:
> > Trivial fix for #9690.
> > Added simple release functions that doing nothing.
> > Not sure whether we can leave it as is or to rework using
> > platform_device helpers like platform_device_alloc.
> 
> Please see Documentation/kobject.txt - search for the text
> "mocked mercilessly" :)
> 
> > This approach is used in many drivers.
> > --
> > 
> >  drivers/mtd/maps/physmap.c |    6 ++++++
> 
> Let's mock David too!

Damn. I knew that everything is not so easy here;) Got it. Tnx.

But in such case there are _again_ many drivers that do implement such
fake functions. Again is because when I tried to port some usb driver
there were issues with locking that was not correct but many drivers
worked exactly this incorrect way.

Anyway, tnx for clarifying this.

V.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-05 16:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-16  0:34 [PATCH] Adding dummy release functions to avoid warnings Vitaliy Ivanov
2008-06-05  9:39 ` [PATCH resend] " Vitaliy Ivanov
2008-06-05 16:07   ` Andrew Morton
2008-06-05 16:31     ` David Woodhouse
2008-06-05 16:32     ` Vitaliy Ivanov

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®