[PATCH] PPC64: add missing braces to rtc driver
Stephen Rothwell
sfr at canb.auug.org.au
Tue Nov 16 11:49:21 EST 2004
Hi Andrew,
This patch fixes the PPC64 rtc driver where a pair of braces was missing.
Not a big bug, but a bug none the less. Also, while I was there, use
C99 initialisers.
Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN linus-bk/arch/ppc64/kernel/rtc.c linus-bk-rtc.1/arch/ppc64/kernel/rtc.c
--- linus-bk/arch/ppc64/kernel/rtc.c 2004-11-12 09:09:48.000000000 +1100
+++ linus-bk-rtc.1/arch/ppc64/kernel/rtc.c 2004-11-10 01:28:56.000000000 +1100
@@ -185,11 +185,10 @@
.release = rtc_release,
};
-static struct miscdevice rtc_dev=
-{
- RTC_MINOR,
- "rtc",
- &rtc_fops
+static struct miscdevice rtc_dev = {
+ .minor = RTC_MINOR,
+ .name = "rtc",
+ .fops = &rtc_fops
};
static int __init rtc_init(void)
@@ -201,9 +200,11 @@
return retval;
#ifdef CONFIG_PROC_FS
- if (create_proc_read_entry ("driver/rtc", 0, NULL, rtc_read_proc, NULL) == NULL)
+ if (create_proc_read_entry("driver/rtc", 0, NULL, rtc_read_proc, NULL)
+ == NULL) {
misc_deregister(&rtc_dev);
return -ENOMEM;
+ }
#endif
printk(KERN_INFO "i/pSeries Real Time Clock Driver v" RTC_VERSION "\n");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20041116/f8f6c9a2/attachment.pgp
More information about the Linuxppc64-dev
mailing list