| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2015 Imagination Technologies |
|---|
| 3 | 4 | * Author: Paul Burton <paul.burton@mips.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 7 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 8 | | - * option) any later version. |
|---|
| 9 | 5 | */ |
|---|
| 10 | 6 | |
|---|
| 11 | 7 | #include <asm/bcache.h> |
|---|
| .. | .. |
|---|
| 55 | 51 | |
|---|
| 56 | 52 | static int __init sc_debugfs_init(void) |
|---|
| 57 | 53 | { |
|---|
| 58 | | - struct dentry *dir, *file; |
|---|
| 59 | | - |
|---|
| 60 | | - if (!mips_debugfs_dir) |
|---|
| 61 | | - return -ENODEV; |
|---|
| 54 | + struct dentry *dir; |
|---|
| 62 | 55 | |
|---|
| 63 | 56 | dir = debugfs_create_dir("l2cache", mips_debugfs_dir); |
|---|
| 64 | | - if (IS_ERR(dir)) |
|---|
| 65 | | - return PTR_ERR(dir); |
|---|
| 66 | | - |
|---|
| 67 | | - file = debugfs_create_file("prefetch", S_IRUGO | S_IWUSR, dir, |
|---|
| 68 | | - NULL, &sc_prefetch_fops); |
|---|
| 69 | | - if (!file) |
|---|
| 70 | | - return -ENOMEM; |
|---|
| 71 | | - |
|---|
| 57 | + debugfs_create_file("prefetch", S_IRUGO | S_IWUSR, dir, NULL, |
|---|
| 58 | + &sc_prefetch_fops); |
|---|
| 72 | 59 | return 0; |
|---|
| 73 | 60 | } |
|---|
| 74 | 61 | late_initcall(sc_debugfs_init); |
|---|