Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
8c17d160
Commit
8c17d160
authored
17 years ago
by
John Crispin
Browse files
Options
Downloads
Patches
Plain Diff
fixes ifxmips wdt driver
SVN-Revision: 9931
parent
32a37816
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
target/linux/ifxmips/files/drivers/char/watchdog/ifxmips_wdt.c
+28
-17
28 additions, 17 deletions
...t/linux/ifxmips/files/drivers/char/watchdog/ifxmips_wdt.c
with
28 additions
and
17 deletions
target/linux/ifxmips/files/drivers/char/watchdog/ifxmips_wdt.c
+
28
−
17
View file @
8c17d160
...
...
@@ -23,9 +23,11 @@
#include
<linux/proc_fs.h>
#include
<linux/ioctl.h>
#include
<linux/module.h>
#include
<linux/platform_device.h>
#include
<linux/watchdog.h>
#include
<linux/miscdevice.h>
#include
<asm-mips/ifxmips/ifxmips_wdt.h>
#include
<asm-mips/ifxmips/ifxmips.h>
#include
<linux/platform_device.h>
#define DRVNAME "ifxmips_wdt"
...
...
@@ -251,28 +253,32 @@ ifxmips_wdt_register_proc_read (char *buf, char **start, off_t offset, int count
return
len
;
}
static
struct
file_operations
wdt_fops
=
{
.
owner
=
THIS_MODULE
,
.
ioctl
=
ifxmips_wdt_ioctl
,
.
open
=
ifxmips_wdt_open
,
.
release
=
ifxmips_wdt_release
,
static
const
struct
file_operations
ifxmips_wdt_fops
=
{
.
owner
=
THIS_MODULE
,
.
llseek
=
no_llseek
,
.
ioctl
=
ifxmips_wdt_ioctl
,
.
open
=
ifxmips_wdt_open
,
.
release
=
ifxmips_wdt_release
,
// .write = at91_wdt_write,
};
static
struct
miscdevice
ifxmips_wdt_miscdev
=
{
.
minor
=
WATCHDOG_MINOR
,
.
name
=
"ifxmips_wdt"
,
.
fops
=
&
ifxmips_wdt_fops
,
};
static
int
ifxmips_wdt_probe
(
struct
platform_device
*
pdev
)
{
ifxmips_wdt_major
=
register_chrdev
(
0
,
"wdt"
,
&
wdt_fops
);
if
(
ifxmips_wdt_major
<
0
)
{
printk
(
"cannot register watchdog device
\n
"
);
return
-
EINVAL
;
}
int
ret
=
misc_register
(
&
ifxmips_wdt_miscdev
);
if
(
ret
)
return
ret
;
create_proc_read_entry
(
"ifxmips_wdt"
,
0
,
NULL
,
ifxmips_wdt_register_proc_read
,
NULL
);
create_proc_read_entry
(
DRVNAME
,
0
,
NULL
,
ifxmips_wdt_register_proc_read
,
NULL
);
printk
(
"
ifxmips watchdog loaded
\n
"
);
printk
(
KERN_INFO
DRVNAME
":
ifxmips watchdog loaded
\n
"
);
return
0
;
}
...
...
@@ -280,7 +286,7 @@ ifxmips_wdt_probe (struct platform_device *pdev)
static
int
ifxmips_wdt_remove
(
struct
platform_device
*
pdev
)
{
un
register
_chrdev
(
ifxmips_wdt_m
ajor
,
"wdt"
);
misc_de
register
(
&
ifxmips_wdt_m
iscdev
);
remove_proc_entry
(
DRVNAME
,
NULL
);
return
0
;
}
...
...
@@ -312,3 +318,8 @@ ifxmips_wdt_cleanup_module (void)
module_init
(
ifxmips_wdt_init_module
);
module_exit
(
ifxmips_wdt_cleanup_module
);
MODULE_AUTHOR
(
"John Crispin <blogic@openwrt.org>"
);
MODULE_DESCRIPTION
(
"Watchdog driver for infineon ifxmips family"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_ALIAS_MISCDEV
(
WATCHDOG_MINOR
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment