Merge branch 'svn-trunk'

This commit is contained in:
Bart Van Assche
2017-04-14 17:45:34 -07:00
4 changed files with 8 additions and 10 deletions

View File

@@ -55,7 +55,7 @@ ifeq ($(INSTALL_MOD_PATH),)
endif
INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra
INFINIBAND_ENABLED = $(shell if grep -wq 'ib_register_client' $$(dirname "$(KDIR)")/modules.symbols; then echo true; else echo false; fi)
INFINIBAND_ENABLED = $(shell syms=$$(dirname "$(KDIR)")/modules.symbols; if [ -e "$$syms" ] && grep -wq 'ib_register_client' "$$syms" || grep -q "^CONFIG_INFINIBAND=[my]$$" "$(KDIR)/.config"; then echo true; else echo false; fi)
all: progs mods

View File

@@ -1,15 +1,15 @@
#include <linux/module.h>
#include <rdma/ib_verbs.h>
static void client_remove(struct ib_device *dev, void *client_data)
static void remove_one(struct ib_device *device, void *client_data)
{
}
static int modinit(void)
{
struct ib_client c = { .remove = client_remove };
struct ib_client c = { .remove = remove_one };
return (uintptr_t)c.remove;
return c.remove != NULL;
}
module_init(modinit);

View File

@@ -1,11 +1,9 @@
#include <linux/module.h>
#include <rdma/ib_verbs.h>
static struct ib_device *dev;
static int modinit(void)
{
return dev->dma_ops != NULL;
return ib_dma_mapping_error(NULL, 0) != 0;
}
module_init(modinit);

View File

@@ -1,15 +1,15 @@
#include <linux/module.h>
#include <rdma/ib_verbs.h>
static void client_remove(struct ib_device *dev, void *client_data)
static void remove_one(struct ib_device *device, void *client_data)
{
}
static int modinit(void)
{
struct ib_client c = { .remove = client_remove };
struct ib_client c = { .remove = remove_one };
return (uintptr_t)c.remove;
return c.remove != NULL;
}
module_init(modinit);