can kernel platform driver name be different than module name?

Tomek The Messenger tomekthemessenger at gmail.com
Sun Mar 22 12:26:09 EDT 2020


I suppose the response is yes but I would like to make sure:
Is below acceptable:
some_module_name.c:
#define DRIVER_NAME          "some-driver-name"
...
static struct platform_driver some_driver = {
    .driver = {
        .name = DRIVER_NAME,
        .of_match_table = of_match_ptr(some_of_match),
    },

vs

Makefile:
SRC := $(shell pwd)
obj-m += some_module_name.o
some_module_name-m := directoryInWhichThereIsUsFile/ some_module_name.o
all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20200322/3a928eea/attachment.html>


More information about the Kernelnewbies mailing list