* dev_printk() is now GPL-only
@ 2006-08-07 2:57 Matthew Wilcox
2006-08-07 3:09 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2006-08-07 2:57 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
Does dev_driver_string() really need to be GPL-only? Up to this point,
proprietary modules have been entitled to call dev_printk(), but now:
#define dev_printk(level, dev, format, arg...) \
printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg)
with
EXPORT_SYMBOL_GPL(dev_driver_string);
means that they're not allowed to.
On a related note, one might wonder if
return dev->driver ? dev->driver->name :
(dev->bus ? dev->bus->name : "");
really qualifies for the full weight of copyright enforcement, and query
whether using it makes your driver a derived work. Particularly since
all one is doing is asking the kernel for a nice printk prefix and know
nothing about the innards of the device model.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: dev_printk() is now GPL-only
2006-08-07 2:57 dev_printk() is now GPL-only Matthew Wilcox
@ 2006-08-07 3:09 ` Greg KH
2006-09-24 5:35 ` Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2006-08-07 3:09 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-kernel
On Sun, Aug 06, 2006 at 08:57:23PM -0600, Matthew Wilcox wrote:
>
> Does dev_driver_string() really need to be GPL-only? Up to this point,
> proprietary modules have been entitled to call dev_printk(), but now:
>
> #define dev_printk(level, dev, format, arg...) \
> printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg)
>
> with
>
> EXPORT_SYMBOL_GPL(dev_driver_string);
>
> means that they're not allowed to.
Oops, good point, I never noticed, as I don't have an closed source
drivers here to test with :)
Care to send me a patch to fix it up?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dev_printk() is now GPL-only
2006-08-07 3:09 ` Greg KH
@ 2006-09-24 5:35 ` Matthew Wilcox
0 siblings, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2006-09-24 5:35 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
On Sun, Aug 06, 2006 at 08:09:58PM -0700, Greg KH wrote:
> Care to send me a patch to fix it up?
Sorry for the delay ...
Make dev_printk usable from non-GPL modules again
dev_printk now calls dev_driver_string. We want even proprietary modules
to be calling dev_printk, so the export of dev_driver_string needs to be
non-GPL-only.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
diff --git a/drivers/base/core.c b/drivers/base/core.c
index be6b5bc..426be09 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -42,7 +42,7 @@ const char *dev_driver_string(struct dev
return dev->driver ? dev->driver->name :
(dev->bus ? dev->bus->name : "");
}
-EXPORT_SYMBOL_GPL(dev_driver_string);
+EXPORT_SYMBOL(dev_driver_string);
#define to_dev(obj) container_of(obj, struct device, kobj)
#define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-24 5:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-07 2:57 dev_printk() is now GPL-only Matthew Wilcox
2006-08-07 3:09 ` Greg KH
2006-09-24 5:35 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox