X-Git-Url: https://git.codelabs.ch/?p=muen%2Flinux.git;a=blobdiff_plain;f=drivers%2Fthunderbolt%2Fswitch.c;h=e9391bbd4036023c63d8b7ec90185f56f9523ade;hp=c6f41b7d38b0d6e8332acf4245835f58ff8bf3cf;hb=5d4eeb8a6124da65a2119601c4016ecc37e867b6;hpb=832e4c83abc5ec25af77db6c8a0f36d78f1cf825 diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index c6f41b7d38b0..e9391bbd4036 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -281,9 +281,11 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id, if (active) { config.name = "nvm_active"; config.reg_read = tb_switch_nvm_read; + config.read_only = true; } else { config.name = "nvm_non_active"; config.reg_write = tb_switch_nvm_write; + config.root_only = true; } config.id = id; @@ -292,7 +294,6 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id, config.size = size; config.dev = &sw->dev; config.owner = THIS_MODULE; - config.root_only = true; config.priv = sw; return nvmem_register(&config);