* [PATCH] Sky Cpu: use C99 style for struct init
@ 2007-07-05 17:59 Cyrill Gorcunov
2007-07-06 9:21 ` Vincent Hanquez
0 siblings, 1 reply; 3+ messages in thread
From: Cyrill Gorcunov @ 2007-07-05 17:59 UTC (permalink / raw)
To: LKML; +Cc: Andrew Morton, Stephen Hemminge
This patch change structure item init
format to C99.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
The patch is over my prev patch named:
[PATCH 1/4] Sky Cpu and Nexus: code style improvement
drivers/misc/hdpuftrs/hdpu_cpustate.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c
index 51e4963..cc33f24 100644
--- a/drivers/misc/hdpuftrs/hdpu_cpustate.c
+++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c
@@ -171,21 +171,21 @@ static struct platform_driver hdpu_cpustate_driver = {
* The various file operations we support.
*/
static const struct file_operations cpustate_fops = {
- owner: THIS_MODULE,
- open: cpustate_open,
- release: cpustate_release,
- read: cpustate_read,
- write: cpustate_write,
- fasync: NULL,
- poll: NULL,
- ioctl: NULL,
- llseek: no_llseek,
+ .owner = THIS_MODULE,
+ .open = cpustate_open,
+ .release = cpustate_release,
+ .read = cpustate_read,
+ .write = cpustate_write,
+ .fasync = NULL,
+ .poll = NULL,
+ .ioctl = NULL,
+ .llseek = no_llseek,
};
static struct miscdevice cpustate_dev = {
- MISC_DYNAMIC_MINOR,
- "sky_cpustate",
- &cpustate_fops,
+ .minor = MISC_DYNAMIC_MINOR,
+ .name = "sky_cpustate",
+ .fops = &cpustate_fops,
};
static int hdpu_cpustate_probe(struct platform_device *pdev)
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Sky Cpu: use C99 style for struct init
2007-07-05 17:59 [PATCH] Sky Cpu: use C99 style for struct init Cyrill Gorcunov
@ 2007-07-06 9:21 ` Vincent Hanquez
2007-07-06 14:11 ` Cyrill Gorcunov
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Hanquez @ 2007-07-06 9:21 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: LKML, Andrew Morton, Stephen Hemminge
On Thu, Jul 05, 2007 at 09:59:10PM +0400, Cyrill Gorcunov wrote:
> + .fasync = NULL,
> + .poll = NULL,
> + .ioctl = NULL,
you can remove those since C99 automaticly initialize missing fields to 0.
Cheers,
--
Vincent Hanquez
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Sky Cpu: use C99 style for struct init
2007-07-06 9:21 ` Vincent Hanquez
@ 2007-07-06 14:11 ` Cyrill Gorcunov
0 siblings, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2007-07-06 14:11 UTC (permalink / raw)
To: Vincent Hanquez; +Cc: Cyrill Gorcunov, LKML, Andrew Morton, Stephen Hemminge
[Vincent Hanquez - Fri, Jul 06, 2007 at 11:21:00AM +0200]
| On Thu, Jul 05, 2007 at 09:59:10PM +0400, Cyrill Gorcunov wrote:
| > + .fasync = NULL,
| > + .poll = NULL,
| > + .ioctl = NULL,
|
| you can remove those since C99 automaticly initialize missing fields to 0.
|
| Cheers,
| --
| Vincent Hanquez
|
ok, thanks
Cyrill
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-06 14:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 17:59 [PATCH] Sky Cpu: use C99 style for struct init Cyrill Gorcunov
2007-07-06 9:21 ` Vincent Hanquez
2007-07-06 14:11 ` Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox