kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* can kernel platform driver name be different than module name?
@ 2020-03-22 16:26 Tomek The Messenger
  2020-03-22 16:34 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Tomek The Messenger @ 2020-03-22 16:26 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 548 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 794 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2020-03-22 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-22 16:26 can kernel platform driver name be different than module name? Tomek The Messenger
2020-03-22 16:34 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).