I suppose the response is yes but I would like to make sure:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
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),
},
.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:some_module_name-m := directoryInWhichThereIsUsFile/ some_module_name.o
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies