Re: module-name-change breaks kobject ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg KH wrote:

On Mon, May 16, 2005 at 01:50:02PM -0600, Jim Cromie wrote:


does kobject stuff rely on a strict name correspondence that makes
this shortcut somehow invalid ?



The kernel will not let you register two drivers with the same name. That is happening when you try to register the pci driver name. That is why this is failing.

In short, don't do this, just unload your old driver and register a new
one.  It really isn't working the way you think it is (only the old one
gets bound to the device, not the new one.)



I think I need to clarify (at some risk of repeating myself)
pls forgive what may seem pedantic (it isnt meant to be)

the old drivers, scx200* are unloaded.
the new ones are the old/existing code, built out of tree, and customized some:


CUST?=scx200
obj-m   += $(CUST).o
obj-m   += $(CUST)_gpio.o

so they have different filenames. the new filename is found by modprobe
in extras, but only after I did a depmod.


IOW, I misspoke about having them both loaded at once,
rather theyre both available for modprobing, rmmoding.
I did this CUST hack cuz there seemed to be naming interference
like you described.

my hacked version, foo.ko, has all the symbols that foo_gpio.ko needs,
but theyre not renamed to get rid of the scx200_ prefix in the orginal object.
Is this why the scx200.ko module gets loaded if I dont preload foo.ko
b4 foo_gpio.ko ?


Or does it have to do with
   static struct file_operations scx200_gpio_fops = {
       .owner   = THIS_MODULE,
or something else entirely ?

thanks,

greg k-h



thanks, and in advance.
Jim Cromie


-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux