From 7b6b0aaf21d80e1389c48e77b35956f09faf03d1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 9 May 2007 00:08:54 +0000 Subject: [PATCH] Reflect changes due to fs structures git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@211 42af7a65-404d-4744-a932-0658087f49c3 --- arch/c5471/src/up_watchdog.c | 4 ++-- drivers/dev_null.c | 3 ++- drivers/serial.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/c5471/src/up_watchdog.c b/arch/c5471/src/up_watchdog.c index 09dd94fff8..efa233d4f7 100644 --- a/arch/c5471/src/up_watchdog.c +++ b/arch/c5471/src/up_watchdog.c @@ -365,7 +365,7 @@ int up_wdtinit(void) /* Register as /dev/wdt */ - ret = register_inode("/dev/wdt", &g_wdtops, 0666, NULL); + ret = register_driver("/dev/wdt", &g_wdtops, 0666, NULL); if (ret) { return ERROR; @@ -384,7 +384,7 @@ int up_wdtinit(void) ret = irq_attach(C5471_IRQ_WATCHDOG, wdt_interrupt); if (ret) { - unregister_inode("/dev/wdt"); + unregister_driver("/dev/wdt"); return ERROR; } diff --git a/drivers/dev_null.c b/drivers/dev_null.c index 0998f424b1..c08f9b0349 100644 --- a/drivers/dev_null.c +++ b/drivers/dev_null.c @@ -65,6 +65,7 @@ static struct file_operations devnull_fops = 0, /* close */ devnull_read, /* read */ devnull_write, /* write */ + 0, /* seek */ 0 /* ioctl */ }; @@ -88,5 +89,5 @@ static ssize_t devnull_write(struct file *filp, const char *buffer, size_t len) void devnull_register(void) { - (void)register_inode("/dev/null", &devnull_fops, 0666, NULL); + (void)register_driver("/dev/null", &devnull_fops, 0666, NULL); } diff --git a/drivers/serial.c b/drivers/serial.c index 29bfa27d7a..e525b067e0 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -83,6 +83,7 @@ struct file_operations g_serialops = uart_close, /* close */ uart_read, /* read */ uart_write, /* write */ + 0, /* seek */ uart_ioctl /* ioctl */ }; @@ -449,7 +450,7 @@ int uart_register(const char *path, uart_dev_t *dev) sem_init(&dev->recvsem, 0, 0); dbg("Registering %s\n", path); - return register_inode(path, &g_serialops, 0666, dev); + return register_driver(path, &g_serialops, 0666, dev); } /************************************************************************************