X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Fdma-debug.c;h=01e64270e246bef1070c9e68a3603051b02bf919;hb=fd25a1f556760dbd6e29dec66c70223a8912cdb2;hp=7d2f0b33e5a82937d2fb615fe5bbbb0de3884777;hpb=950f564b707ca1b1c5bb94cd1e7d2a0702bfcadc;p=karo-tx-linux.git diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 7d2f0b33e5a8..01e64270e246 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -570,7 +570,7 @@ static ssize_t filter_write(struct file *file, const char __user *userbuf, * Now parse out the first token and use it as the name for the * driver to filter for. */ - for (i = 0; i < NAME_MAX_LEN; ++i) { + for (i = 0; i < NAME_MAX_LEN - 1; ++i) { current_driver_name[i] = buf[i]; if (isspace(buf[i]) || buf[i] == ' ' || buf[i] == 0) break; @@ -587,7 +587,7 @@ out_unlock: return count; } -const struct file_operations filter_fops = { +static const struct file_operations filter_fops = { .read = filter_read, .write = filter_write, };