Skip to content

Commit

Permalink
firewire: nosy: misc cleanups
Browse files Browse the repository at this point in the history
Extend copyright note to 2007, c.f. Kristian's git log.

Includes:
  - replace some <asm/*.h> by <linux/*.h>
  - add required indirectly included <linux/spinlock.h>
  - order alphabetically

Coding style related changes:
  - change to utf8
  - normalize whitespace
  - normalize comment style
  - remove usages of __FUNCTION__
  - remove an unnecessary cast from void *

Const and static declarations:
  - driver_name is not const in pci_driver.name, drop const qualifier
  - driver_name can be taken from KBUILD_MODNAME
  - the global variable minors[] can and should be static
  - constify struct file_operations instance

Data types:
  - Remove unused struct member struct packet.code.  struct packet is
    only used for driver-internal bookkeeping; it does not appear on the
    wire or in DMA programs or the userspace ABI.  Hence the unused
    member .code can be removed without worries.

Preprocessor macros:
  - unroll a preprocessor macro that containd a return
  - use list_for_each_entry

Printk:
  - add missing terminating \n in some format strings

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Stefan Richter committed Jul 27, 2010
1 parent 2864682 commit b5e4772
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 188 deletions.
10 changes: 5 additions & 5 deletions drivers/firewire/nosy-user.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#ifndef __nosy_user_h
#define __nosy_user_h

#include <asm/ioctl.h>
#include <asm/types.h>
#include <linux/ioctl.h>
#include <linux/types.h>

#define NOSY_IOC_GET_STATS _IOR('&', 0, struct nosy_stats)
#define NOSY_IOC_START _IO('&', 1)
#define NOSY_IOC_STOP _IO('&', 2)
#define NOSY_IOC_FILTER _IOW('&', 2, __u32)

struct nosy_stats {
__u32 total_packet_count;
__u32 lost_packet_count;
__u32 total_packet_count;
__u32 lost_packet_count;
};

/*
/*
* Format of packets returned from the kernel driver:
*
* quadlet with timestamp (microseconds)
Expand Down
Loading

0 comments on commit b5e4772

Please sign in to comment.