diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cache.h | 4 | ||||
| -rw-r--r-- | include/linux/dvb/video.h | 3 | ||||
| -rw-r--r-- | include/linux/etherdevice.h | 6 | ||||
| -rw-r--r-- | include/linux/hfs_fs.h | 348 | ||||
| -rw-r--r-- | include/linux/hfs_fs_i.h | 45 | ||||
| -rw-r--r-- | include/linux/hfs_fs_sb.h | 53 | ||||
| -rw-r--r-- | include/linux/hfs_sysdep.h | 238 | ||||
| -rw-r--r-- | include/linux/isicom.h | 1 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 5 | ||||
| -rw-r--r-- | include/linux/serial.h | 1 | ||||
| -rw-r--r-- | include/linux/tty_driver.h | 1 |
11 files changed, 3 insertions, 702 deletions
diff --git a/include/linux/cache.h b/include/linux/cache.h index 3db3832f35cb..4d767b93738a 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -26,13 +26,9 @@ #endif #ifndef __cacheline_aligned -#ifdef MODULE -#define __cacheline_aligned ____cacheline_aligned -#else #define __cacheline_aligned \ __attribute__((__aligned__(SMP_CACHE_BYTES), \ __section__(".data.cacheline_aligned"))) -#endif #endif /* __cacheline_aligned */ #ifndef __cacheline_aligned_in_smp diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 6727f422da61..09a4286fb02b 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h @@ -81,9 +81,11 @@ typedef enum { struct video_event { int32_t type; #define VIDEO_EVENT_SIZE_CHANGED 1 +#define VIDEO_EVENT_FRAME_RATE_CHANGED 2 time_t timestamp; union { video_size_t size; + unsigned int frame_rate; /* in frames per 1000sec */ } u; }; @@ -194,6 +196,7 @@ typedef uint16_t video_attributes_t; #define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t) #define VIDEO_SET_ATTRIBUTES _IO('o', 53) #define VIDEO_GET_SIZE _IOR('o', 55, video_size_t) +#define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int) #endif /*_DVBVIDEO_H_*/ diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 416017dc3927..462f7234695f 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h @@ -38,12 +38,6 @@ extern int eth_header_cache(struct neighbour *neigh, struct hh_cache *hh); extern int eth_header_parse(struct sk_buff *skb, unsigned char *haddr); -extern struct net_device *__init_etherdev(struct net_device *dev, int sizeof_priv); -static inline struct net_device *init_etherdev(struct net_device *dev, - int sizeof_priv) -{ - return __init_etherdev(dev, sizeof_priv); -} extern struct net_device *alloc_etherdev(int sizeof_priv); static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base) diff --git a/include/linux/hfs_fs.h b/include/linux/hfs_fs.h deleted file mode 100644 index 6cddc472d859..000000000000 --- a/include/linux/hfs_fs.h +++ /dev/null @@ -1,348 +0,0 @@ -/* - * linux/include/linux/hfs_fs.h - * - * Copyright (C) 1995-1997 Paul H. Hargrove - * This file may be distributed under the terms of the GNU General Public License. - * - * The source code distribution of the Columbia AppleTalk Package for - * UNIX, version 6.0, (CAP) was used as a specification of the - * location and format of files used by CAP's Aufs. No code from CAP - * appears in hfs_fs. hfs_fs is not a work ``derived'' from CAP in - * the sense of intellectual property law. - * - * The source code distributions of Netatalk, versions 1.3.3b2 and - * 1.4b2, were used as a specification of the location and format of - * files used by Netatalk's afpd. No code from Netatalk appears in - * hfs_fs. hfs_fs is not a work ``derived'' from Netatalk in the - * sense of intellectual property law. - */ - -#ifndef _LINUX_HFS_FS_H -#define _LINUX_HFS_FS_H - -#include <linux/hfs_sysdep.h> - -/* magic numbers for Apple Double header files */ -#define HFS_DBL_MAGIC 0x00051607 -#define HFS_SNGL_MAGIC 0x00051600 -#define HFS_HDR_VERSION_1 0x00010000 -#define HFS_HDR_VERSION_2 0x00020000 - -/* magic numbers for various internal structures */ -#define HFS_INO_MAGIC 0x4821 -#define HFS_SB_MAGIC 0x4822 - -/* The space used for the AppleDouble or AppleSingle headers */ -#define HFS_DBL_HDR_LEN 1024 - -/* The space used for the Netatalk header */ -#define HFS_NAT_HDR_LEN 1024 /* 589 for an exact match */ - -/* Macros to extract CNID and file "type" from the Linux inode number */ -#define HFS_CNID(X) ((X) & 0x3FFFFFFF) -#define HFS_ITYPE(X) ((X) & 0xC0000000) - -/* Macros to enumerate types */ -#define HFS_ITYPE_TO_INT(X) ((X) >> 30) -#define HFS_INT_TO_ITYPE(X) ((X) << 30) - -/* generic ITYPEs */ -#define HFS_ITYPE_0 0x00000000 -#define HFS_ITYPE_1 0x40000000 -#define HFS_ITYPE_2 0x80000000 -#define HFS_ITYPE_3 0xC0000000 -#define HFS_ITYPE_NORM HFS_ITYPE_0 /* "normal" directory or file */ - -/* ITYPEs for CAP */ -#define HFS_CAP_NORM HFS_ITYPE_0 /* data fork or normal directory */ -#define HFS_CAP_DATA HFS_ITYPE_0 /* data fork of file */ -#define HFS_CAP_NDIR HFS_ITYPE_0 /* normal directory */ -#define HFS_CAP_FNDR HFS_ITYPE_1 /* finder info for file or dir */ -#define HFS_CAP_RSRC HFS_ITYPE_2 /* resource fork of file */ -#define HFS_CAP_RDIR HFS_ITYPE_2 /* .resource directory */ -#define HFS_CAP_FDIR HFS_ITYPE_3 /* .finderinfo directory */ - -/* ITYPEs for Apple Double */ -#define HFS_DBL_NORM HFS_ITYPE_0 /* data fork or directory */ -#define HFS_DBL_DATA HFS_ITYPE_0 /* data fork of file */ -#define HFS_DBL_DIR HFS_ITYPE_0 /* directory */ -#define HFS_DBL_HDR HFS_ITYPE_1 /* AD header of file or dir */ - -/* ITYPEs for netatalk */ -#define HFS_NAT_NORM HFS_ITYPE_0 /* data fork or directory */ -#define HFS_NAT_DATA HFS_ITYPE_0 /* data fork of file */ -#define HFS_NAT_NDIR HFS_ITYPE_0 /* normal directory */ -#define HFS_NAT_HDR HFS_ITYPE_1 /* AD header of file or dir */ -#define HFS_NAT_HDIR HFS_ITYPE_2 /* directory holding AD headers */ - -/* ITYPEs for Apple Single */ -#define HFS_SGL_NORM HFS_ITYPE_0 /* AppleSingle file or directory */ -#define HFS_SGL_SNGL HFS_ITYPE_0 /* AppleSingle file */ -#define HFS_SGL_DIR HFS_ITYPE_0 /* directory */ -#define HFS_SGL_DINF HFS_ITYPE_1 /* %DirInfo for directory */ - -/* IDs for elements of an AppleDouble or AppleSingle header */ -#define HFS_HDR_DATA 1 /* data fork */ -#define HFS_HDR_RSRC 2 /* resource fork */ -#define HFS_HDR_FNAME 3 /* full (31-character) name */ -#define HFS_HDR_COMNT 4 /* comment */ -#define HFS_HDR_BWICN 5 /* b/w icon */ -#define HFS_HDR_CICON 6 /* color icon info */ -#define HFS_HDR_OLDI 7 /* old file info */ -#define HFS_HDR_DATES 8 /* file dates info */ -#define HFS_HDR_FINFO 9 /* Finder info */ -#define HFS_HDR_MACI 10 /* Macintosh info */ -#define HFS_HDR_PRODOSI 11 /* ProDOS info */ -#define HFS_HDR_MSDOSI 12 /* MSDOS info */ -#define HFS_HDR_SNAME 13 /* short name */ -#define HFS_HDR_AFPI 14 /* AFP file info */ -#define HFS_HDR_DID 15 /* directory id */ -#define HFS_HDR_MAX 16 - -/* - * There are three time systems. All three are based on seconds since - * a particular time/date. - * Unix: unsigned lil-endian since 00:00 GMT, Jan. 1, 1970 - * mac: unsigned big-endian since 00:00 GMT, Jan. 1, 1904 - * header: SIGNED big-endian since 00:00 GMT, Jan. 1, 2000 - * - */ -#define hfs_h_to_mtime(ARG) htonl((hfs_s32)ntohl(ARG)+3029529600U) -#define hfs_m_to_htime(ARG) ((hfs_s32)htonl(ntohl(ARG)-3029529600U)) -#define hfs_h_to_utime(ARG) ((hfs_s32)hfs_to_utc(ntohl(ARG)+946684800U)) -#define hfs_u_to_htime(ARG) ((hfs_s32)htonl(hfs_from_utc(ARG)-946684800U)) -#define hfs_u_to_mtime(ARG) htonl(hfs_from_utc(ARG)+2082844800U) -#define hfs_m_to_utime(ARG) (hfs_to_utc(ntohl(ARG)-2082844800U)) - -/*======== Data structures kept in memory ========*/ - -/* - * A descriptor for a single entry within the header of an - * AppleDouble or AppleSingle header file. - * An array of these make up a table of contents for the file. - */ -struct hfs_hdr_descr { - hfs_u32 id; /* The Apple assigned ID for the entry type */ - hfs_u32 offset; /* The offset to reach the entry */ - hfs_u32 length; /* The length of the entry */ -}; - -/* - * The info needed to reconstruct a given header layout - */ -struct hfs_hdr_layout { - hfs_u32 magic; /* AppleSingle or AppleDouble */ - hfs_u32 version; /* 0x00010000 or 0x00020000 */ - hfs_u16 entries; /* How many entries used */ - struct hfs_hdr_descr - descr[HFS_HDR_MAX]; /* Descriptors */ - struct hfs_hdr_descr - *order[HFS_HDR_MAX]; /* 'descr' ordered by offset */ -}; - -/* header layout for netatalk's v1 appledouble file format */ -struct hfs_nat_hdr { - hfs_lword_t magic; - hfs_lword_t version; - hfs_byte_t homefs[16]; - hfs_word_t entries; - hfs_byte_t descrs[12*5]; - hfs_byte_t real_name[255]; /* id=3 */ - hfs_byte_t comment[200]; /* id=4 XXX: not yet implemented */ - hfs_byte_t old_info[16]; /* id=7 */ - hfs_u8 finderinfo[32]; /* id=9 */ -}; - -/* - * Default header layout for Netatalk and AppleDouble - */ -struct hfs_dbl_hdr { - hfs_lword_t magic; - hfs_lword_t version; - hfs_byte_t filler[16]; - hfs_word_t entries; - hfs_byte_t descrs[12*HFS_HDR_MAX]; - hfs_byte_t real_name[255]; /* id=3 */ - hfs_byte_t comment[200]; /* id=4 XXX: not yet implemented */ - hfs_u32 create_time; /* \ */ - hfs_u32 modify_time; /* | id=8 (or 7) */ - hfs_u32 backup_time; /* | */ - hfs_u32 access_time; /* / (attributes with id=7) */ - hfs_u8 finderinfo[32]; /* id=9 */ - hfs_u32 fileinfo; /* id=10 */ - hfs_u32 cnid; /* id=15 */ - hfs_u8 short_name[12]; /* id=13 */ - hfs_u8 prodosi[8]; /* id=11 */ -}; - - -/* finder metadata for CAP */ -struct hfs_cap_info { - hfs_byte_t fi_fndr[32]; /* Finder's info */ - hfs_word_t fi_attr; /* AFP attributes (f=file/d=dir) */ -#define HFS_AFP_INV 0x001 /* Invisible bit (f/d) */ -#define HFS_AFP_EXPFOLDER 0x002 /* exported folder (d) */ -#define HFS_AFP_MULTI 0x002 /* Multiuser bit (f) */ -#define HFS_AFP_SYS 0x004 /* System bit (f/d) */ -#define HFS_AFP_DOPEN 0x008 /* data fork already open (f) */ -#define HFS_AFP_MOUNTED 0x008 /* mounted folder (d) */ -#define HFS_AFP_ROPEN 0x010 /* resource fork already open (f) */ -#define HFS_AFP_INEXPFOLDER 0x010 /* folder in shared area (d) */ -#define HFS_AFP_WRI 0x020 /* Write inhibit bit (readonly) (f) */ -#define HFS_AFP_BACKUP 0x040 /* backup needed bit (f/d) */ -#define HFS_AFP_RNI 0x080 /* Rename inhibit bit (f/d) */ -#define HFS_AFP_DEI 0x100 /* Delete inhibit bit (f/d) */ -#define HFS_AFP_NOCOPY 0x400 /* Copy protect bit (f) */ -#define HFS_AFP_RDONLY ( HFS_AFP_WRI|HFS_AFP_RNI|HFS_AFP_DEI) - hfs_byte_t fi_magic1; /* Magic number: */ -#define HFS_CAP_MAGIC1 0xFF - hfs_byte_t fi_version; /* Version of this structure: */ -#define HFS_CAP_VERSION 0x10 - hfs_byte_t fi_magic; /* Another magic number: */ -#define HFS_CAP_MAGIC 0xDA - hfs_byte_t fi_bitmap; /* Bitmap of which names are valid: */ -#define HFS_CAP_SHORTNAME 0x01 -#define HFS_CAP_LONGNAME 0x02 - hfs_byte_t fi_shortfilename[12+1]; /* "short name" (unused) */ - hfs_byte_t fi_macfilename[32+1]; /* Original (Macintosh) name */ - hfs_byte_t fi_comln; /* Length of comment (always 0) */ - hfs_byte_t fi_comnt[200]; /* Finder comment (unused) */ - /* optional: used by aufs only if compiled with USE_MAC_DATES */ - hfs_byte_t fi_datemagic; /* Magic number for dates extension: */ -#define HFS_CAP_DMAGIC 0xDA - hfs_byte_t fi_datevalid; /* Bitmap of which dates are valid: */ -#define HFS_CAP_MDATE 0x01 -#define HFS_CAP_CDATE 0x02 - hfs_lword_t fi_ctime; /* Creation date (in AFP format) */ - hfs_lword_t fi_mtime; /* Modify date (in AFP format) */ - hfs_lword_t fi_utime; /* Un*x time of last mtime change */ - hfs_byte_t pad; -}; - -#ifdef __KERNEL__ - -typedef ssize_t hfs_rwret_t; -typedef size_t hfs_rwarg_t; - -#include <asm/uaccess.h> - -/* Some forward declarations */ -struct hfs_fork; -struct hfs_cat_key; -struct hfs_cat_entry; -extern struct hfs_cat_entry *hfs_cat_get(struct hfs_mdb *, - const struct hfs_cat_key *); - -/* dir.c */ -extern int hfs_create(struct inode *, struct dentry *, int, struct nameidata *); -extern int hfs_mkdir(struct inode *, struct dentry *, int); -extern int hfs_unlink(struct inode *, struct dentry *); -extern int hfs_rmdir(struct inode *, struct dentry *); -extern int hfs_rename(struct inode *, struct dentry *, - struct inode *, struct dentry *); - -/* dir_cap.c */ -extern const struct hfs_name hfs_cap_reserved1[]; -extern const struct hfs_name hfs_cap_reserved2[]; -extern struct inode_operations hfs_cap_ndir_inode_operations; -extern struct inode_operations hfs_cap_fdir_inode_operations; -extern struct inode_operations hfs_cap_rdir_inode_operations; -extern struct file_operations hfs_cap_dir_operations; -extern void hfs_cap_drop_dentry(struct dentry *, const ino_t); - -/* dir_dbl.c */ -extern const struct hfs_name hfs_dbl_reserved1[]; -extern const struct hfs_name hfs_dbl_reserved2[]; -extern struct inode_operations hfs_dbl_dir_inode_operations; -extern struct file_operations hfs_dbl_dir_operations; -extern void hfs_dbl_drop_dentry(struct dentry *, const ino_t); - -/* dir_nat.c */ -extern const struct hfs_name hfs_nat_reserved1[]; -extern const struct hfs_name hfs_nat_reserved2[]; -extern struct inode_operations hfs_nat_ndir_inode_operations; -extern struct inode_operations hfs_nat_hdir_inode_operations; -extern struct file_operations hfs_nat_dir_operations; -extern void hfs_nat_drop_dentry(struct dentry *, const ino_t); - -/* file.c */ -extern hfs_s32 hfs_do_read(struct inode *, struct hfs_fork *, hfs_u32, - char __user *, hfs_u32); -extern hfs_s32 hfs_do_write(struct inode *, struct hfs_fork *, hfs_u32, - const char __user *, hfs_u32); -extern void hfs_file_fix_mode(struct hfs_cat_entry *entry); -extern struct inode_operations hfs_file_inode_operations; -extern struct file_operations hfs_file_operations; - -/* file_cap.c */ -extern struct inode_operations hfs_cap_info_inode_operations; -extern struct file_operations hfs_cap_info_operations; - -/* file_hdr.c */ -extern struct inode_operations hfs_hdr_inode_operations; -extern struct file_operations hfs_hdr_operations; -extern const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout; -extern const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout; -extern const struct hfs_hdr_layout hfs_nat_hdr_layout; -extern const struct hfs_hdr_layout hfs_nat2_hdr_layout; -extern const struct hfs_hdr_layout hfs_sngl_hdr_layout; -extern void hdr_truncate(struct inode *,size_t); - -/* inode.c */ -extern void hfs_put_inode(struct inode *); -extern int hfs_notify_change(struct dentry *, struct iattr *); -extern int hfs_notify_change_cap(struct dentry *, struct iattr *); -extern int hfs_notify_change_hdr(struct dentry *, struct iattr *); -extern struct inode *hfs_iget(struct hfs_cat_entry *, ino_t, struct dentry *); - -extern void hfs_cap_ifill(struct inode *, ino_t, const int); -extern void hfs_dbl_ifill(struct inode *, ino_t, const int); -extern void hfs_nat_ifill(struct inode *, ino_t, const int); -extern void hfs_sngl_ifill(struct inode *, ino_t, const int); - -/* super.c */ -extern int hfs_fill_super(struct super_block *,void *,int); - -/* trans.c */ -extern void hfs_colon2mac(struct hfs_name *, const char *, int); -extern void hfs_prcnt2mac(struct hfs_name *, const char *, int); -extern void hfs_triv2mac(struct hfs_name *, const char *, int); -extern void hfs_latin2mac(struct hfs_name *, const char *, int); -extern int hfs_mac2cap(char *, const struct hfs_name *); -extern int hfs_mac2nat(char *, const struct hfs_name *); -extern int hfs_mac2latin(char *, const struct hfs_name *); -extern int hfs_mac2seven(char *, const struct hfs_name *); -extern int hfs_mac2eight(char *, const struct hfs_name *); -extern int hfs_mac2alpha(char *, const struct hfs_name *); -extern int hfs_mac2triv(char *, const struct hfs_name *); -extern void hfs_tolower(unsigned char *, int); - -#include <linux/hfs_fs_i.h> -#include <linux/hfs_fs_sb.h> - -static inline struct hfs_inode_info *HFS_I(struct inode *inode) -{ - return container_of(inode, struct hfs_inode_info, vfs_inode); -} - -static inline struct hfs_sb_info *HFS_SB(struct super_block *sb) -{ - return sb->s_fs_info; -} - -static inline void hfs_nameout(struct inode *dir, struct hfs_name *out, - const char *in, int len) { - HFS_SB(dir->i_sb)->s_nameout(out, in, len); -} - -static inline int hfs_namein(struct inode *dir, char *out, - const struct hfs_name *in) { - int len = HFS_SB(dir->i_sb)->s_namein(out, in); - if (HFS_SB(dir->i_sb)->s_lowercase) { - hfs_tolower(out, len); - } - return len; -} - -#endif /* __KERNEL__ */ -#endif diff --git a/include/linux/hfs_fs_i.h b/include/linux/hfs_fs_i.h deleted file mode 100644 index 119cc5200197..000000000000 --- a/include/linux/hfs_fs_i.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * linux/include/linux/hfs_fs_i.h - * - * Copyright (C) 1995, 1996 Paul H. Hargrove - * This file may be distributed under the terms of the GNU General Public License. - * - * This file defines the type (struct hfs_inode_info) and the two - * subordinate types hfs_extent and hfs_file. - */ - -#ifndef _LINUX_HFS_FS_I_H -#define _LINUX_HFS_FS_I_H - -/* - * struct hfs_inode_info - * - * The HFS-specific part of a Linux (struct inode) - */ -struct hfs_inode_info { - int magic; /* A magic number */ - - loff_t mmu_private; - struct hfs_cat_entry *entry; - - /* For a regular or header file */ - struct hfs_fork *fork; - int convert; - - /* For a directory */ - ino_t file_type; - char dir_size; - - /* For header files */ - const struct hfs_hdr_layout *default_layout; - struct hfs_hdr_layout *layout; - - /* to deal with localtime ugliness */ - int tz_secondswest; - - /* for dentry cleanup */ - void (*d_drop_op)(struct dentry *, const ino_t); - struct inode vfs_inode; -}; - -#endif diff --git a/include/linux/hfs_fs_sb.h b/include/linux/hfs_fs_sb.h deleted file mode 100644 index 037ebd428b91..000000000000 --- a/include/linux/hfs_fs_sb.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * linux/include/linux/hfs_fs_sb.h - * - * Copyright (C) 1995-1997 Paul H. Hargrove - * This file may be distributed under the terms of the GNU General Public License. - * - * This file defines the type (struct hfs_sb_info) which contains the - * HFS-specific information in the in-core superblock. - */ - -#ifndef _LINUX_HFS_FS_SB_H -#define _LINUX_HFS_FS_SB_H - -/* forward declaration: */ -struct hfs_name; - -typedef int (*hfs_namein_fn) (char *, const struct hfs_name *); -typedef void (*hfs_nameout_fn) (struct hfs_name *, const char *, int); -typedef void (*hfs_ifill_fn) (struct inode *, ino_t, const int); - -/* - * struct hfs_sb_info - * - * The HFS-specific part of a Linux (struct super_block) - */ -struct hfs_sb_info { - int magic; /* A magic number */ - struct hfs_mdb *s_mdb; /* The HFS MDB */ - int s_quiet; /* Silent failure when - changing owner or mode? */ - int s_lowercase; /* Map names to lowercase? */ - int s_afpd; /* AFPD compatible mode? */ - int s_version; /* version info */ - hfs_namein_fn s_namein; /* The function used to - map Mac filenames to - Linux filenames */ - hfs_nameout_fn s_nameout; /* The function used to - map Linux filenames - to Mac filenames */ - hfs_ifill_fn s_ifill; /* The function used - to fill in inode fields */ - const struct hfs_name *s_reserved1; /* Reserved names */ - const struct hfs_name *s_reserved2; /* Reserved names */ - __u32 s_type; /* Type for new files */ - __u32 s_creator; /* Creator for new files */ - umode_t s_umask; /* The umask applied to the - permissions on all files */ - uid_t s_uid; /* The uid of all files */ - gid_t s_gid; /* The gid of all files */ - char s_conv; /* Type of text conversion */ -}; - -#endif diff --git a/include/linux/hfs_sysdep.h b/include/linux/hfs_sysdep.h deleted file mode 100644 index 4c4e3eba0963..000000000000 --- a/include/linux/hfs_sysdep.h +++ /dev/null @@ -1,238 +0,0 @@ -/* - * linux/include/linux/hfs_sysdep.h - * - * Copyright (C) 1996-1997 Paul H. Hargrove - * This file may be distributed under the terms of the GNU General Public License. - * - * This file contains constants, types and inline - * functions for various system dependent things. - * - * "XXX" in a comment is a note to myself to consider changing something. - * - * In function preconditions the term "valid" applied to a pointer to - * a structure means that the pointer is non-NULL and the structure it - * points to has all fields initialized to consistent values. - */ - -#ifndef _HFS_SYSDEP_H -#define _HFS_SYSDEP_H - -#include <linux/slab.h> -#include <linux/types.h> -#include <linux/fs.h> -#include <linux/sched.h> -#include <linux/buffer_head.h> - -#include <asm/byteorder.h> -#include <asm/unaligned.h> - -extern struct timezone sys_tz; - -/* Typedefs for integer types by size and signedness */ -typedef __u8 hfs_u8; -typedef __u16 hfs_u16; -typedef __u32 hfs_u32; -typedef __s8 hfs_s8; -typedef __s16 hfs_s16; -typedef __s32 hfs_s32; - -/* Typedefs for unaligned integer types */ -typedef unsigned char hfs_byte_t; -typedef unsigned char hfs_word_t[2]; -typedef unsigned char hfs_lword_t[4]; - -/* these funny looking things are GCC variable argument macros */ -#define hfs_warn(format, args...) printk(KERN_WARNING format , ## args) -#define hfs_error(format, args...) printk(KERN_ERR format , ## args) - - -#if defined(DEBUG_ALL) || defined(DEBUG_MEM) -extern long int hfs_alloc; -#endif - -static inline void *hfs_malloc(unsigned int size) { -#if defined(DEBUG_ALL) || defined(DEBUG_MEM) - hfs_warn("%ld bytes allocation at %s:%u\n", - (hfs_alloc += size), __FILE__, __LINE__); -#endif - return kmalloc(size, GFP_KERNEL); -} - -static inline void hfs_free(void *ptr, unsigned int size) { - kfree(ptr); -#if defined(DEBUG_ALL) || defined(DEBUG_MEM) - hfs_warn("%ld bytes allocation at %s:%u\n", - (hfs_alloc -= ptr ? size : 0), __FILE__, __LINE__); -#endif -} - - -/* handle conversion between times. - * - * NOTE: hfs+ doesn't need this. also, we don't use tz_dsttime as that's - * not a good thing to do. instead, we depend upon tz_minuteswest - * having the correct daylight savings correction. - */ -static inline hfs_u32 hfs_from_utc(hfs_s32 time) -{ - return time - sys_tz.tz_minuteswest*60; -} - -static inline hfs_s32 hfs_to_utc(hfs_u32 time) -{ - return time + sys_tz.tz_minuteswest*60; -} - -static inline hfs_u32 hfs_time(void) { - return htonl(hfs_from_utc(get_seconds())+2082844800U); -} - - -/* - * hfs_wait_queue - */ -typedef wait_queue_head_t hfs_wait_queue; - -static inline void hfs_init_waitqueue(hfs_wait_queue *queue) { - init_waitqueue_head(queue); -} - -static inline void hfs_sleep_on(hfs_wait_queue *queue) { - sleep_on(queue); -} - -static inline void hfs_wake_up(hfs_wait_queue *queue) { - wake_up(queue); -} - -static inline void hfs_relinquish(void) { - schedule(); -} - - -/* - * hfs_sysmdb - */ -typedef struct super_block *hfs_sysmdb; - -static inline void hfs_mdb_dirty(hfs_sysmdb sys_mdb) { - sys_mdb->s_dirt = 1; -} - -static inline const char *hfs_mdb_name(hfs_sysmdb sys_mdb) { - return sys_mdb->s_id; -} - - -/* - * hfs_sysentry - */ -typedef struct dentry *hfs_sysentry[4]; - -/* - * hfs_buffer - */ -typedef struct buffer_head *hfs_buffer; - -#define HFS_BAD_BUFFER NULL - -/* In sysdep.c, since it needs HFS_SECTOR_SIZE */ -extern hfs_buffer hfs_buffer_get(hfs_sysmdb, int, int); - -static inline int hfs_buffer_ok(hfs_buffer buffer) { - return (buffer != NULL); -} - -static inline void hfs_buffer_put(hfs_buffer buffer) { - brelse(buffer); -} - -static inline void hfs_buffer_dirty(hfs_buffer buffer) { - mark_buffer_dirty(buffer); -} - -static inline void hfs_buffer_sync(hfs_buffer buffer) { - if (buffer_dirty(buffer)) - sync_dirty_buffer(buffer); -} - -static inline void *hfs_buffer_data(const hfs_buffer buffer) { - return buffer->b_data; -} - - -/* - * bit operations - */ - -#undef BITNR -#if defined(__BIG_ENDIAN) -# define BITNR(X) ((X)^31) -# if !defined(__constant_htonl) -# define __constant_htonl(x) (x) -# endif -# if !defined(__constant_htons) -# define __constant_htons(x) (x) -# endif -#elif defined(__LITTLE_ENDIAN) -# define BITNR(X) ((X)^7) -# if !defined(__constant_htonl) -# define __constant_htonl(x) \ - ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \ - (((unsigned long int)(x) & 0x0000ff00U) << 8) | \ - (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \ - (((unsigned long int)(x) & 0xff000000U) >> 24))) -# endif -# if !defined(__constant_htons) -# define __constant_htons(x) \ - ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \ - (((unsigned short int)(x) & 0xff00) >> 8))) -# endif -#else -# error "Don't know if bytes are big- or little-endian!" -#endif - -static inline int hfs_clear_bit(int bitnr, hfs_u32 *lword) { - return test_and_clear_bit(BITNR(bitnr), (unsigned long *)lword); -} - -static inline int hfs_set_bit(int bitnr, hfs_u32 *lword) { - return test_and_set_bit(BITNR(bitnr), (unsigned long *)lword); -} - -static inline int hfs_test_bit(int bitnr, const hfs_u32 *lword) { - /* the kernel should declare the second arg of test_bit as const */ - return test_bit(BITNR(bitnr), (unsigned long *)lword); -} - -#undef BITNR - -/* - * HFS structures have fields aligned to 16-bit boundaries. - * So, 16-bit get/put are easy while 32-bit get/put need - * some care on architectures like the DEC Alpha. - * - * In what follows: - * ns = 16-bit integer in network byte-order w/ 16-bit alignment - * hs = 16-bit integer in host byte-order w/ 16-bit alignment - * nl = 32-bit integer in network byte-order w/ unknown alignment - * hl = 32-bit integer in host byte-order w/ unknown alignment - * anl = 32-bit integer in network byte-order w/ 32-bit alignment - * ahl = 32-bit integer in host byte-order w/ 32-bit alignment - * Example: hfs_get_hl() gets an unaligned 32-bit integer converting - * it to host byte-order. - */ -#define hfs_get_hs(addr) ntohs(*((hfs_u16 *)(addr))) -#define hfs_get_ns(addr) (*((hfs_u16 *)(addr))) -#define hfs_get_hl(addr) ntohl(get_unaligned((hfs_u32 *)(addr))) -#define hfs_get_nl(addr) get_unaligned((hfs_u32 *)(addr)) -#define hfs_get_ahl(addr) ntohl(*((hfs_u32 *)(addr))) -#define hfs_get_anl(addr) (*((hfs_u32 *)(addr))) -#define hfs_put_hs(val, addr) ((void)(*((hfs_u16 *)(addr)) = ntohs(val))) -#define hfs_put_ns(val, addr) ((void)(*((hfs_u16 *)(addr)) = (val))) -#define hfs_put_hl(val, addr) put_unaligned(htonl(val), (hfs_u32 *)(addr)) -#define hfs_put_nl(val, addr) put_unaligned((val), (hfs_u32 *)(addr)) -#define hfs_put_ahl(val, addr) ((void)(*((hfs_u32 *)(addr)) = ntohl(val))) -#define hfs_put_anl(val, addr) ((void)(*((hfs_u32 *)(addr)) = (val))) - -#endif diff --git a/include/linux/isicom.h b/include/linux/isicom.h index c24383215978..a5a3eea548e8 100644 --- a/include/linux/isicom.h +++ b/include/linux/isicom.h @@ -73,7 +73,6 @@ typedef struct { #define PORT_COUNT (BOARD_COUNT*16) #define SERIAL_TYPE_NORMAL 1 -#define SERIAL_TYPE_CALLOUT 2 /* character sizes */ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ebc9426684ba..fd5ae72d8ae9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -525,11 +525,6 @@ extern struct net_device *__dev_get_by_flags(unsigned short flags, unsigned short mask); extern struct net_device *dev_get_by_name(const char *name); extern struct net_device *__dev_get_by_name(const char *name); -extern struct net_device *__dev_alloc(const char *name, int *err); -static inline __deprecated struct net_device *dev_alloc(const char *name, int *err) -{ - return __dev_alloc(name, err); -} extern int dev_alloc_name(struct net_device *dev, const char *name); extern int dev_open(struct net_device *dev); extern int dev_close(struct net_device *dev); diff --git a/include/linux/serial.h b/include/linux/serial.h index 465f19a0d53d..9a07d00106f9 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h @@ -131,7 +131,6 @@ struct serial_uart_config { /* Internal flags used only by kernel/chr_drv/serial.c */ #define ASYNC_INITIALIZED 0x80000000 /* Serial port was initialized */ -#define ASYNC_CALLOUT_ACTIVE 0x40000000 /* Call out device is active */ #define ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device is active */ #define ASYNC_BOOT_AUTOCONF 0x10000000 /* Autoconfigure port on bootup */ #define ASYNC_CLOSING 0x08000000 /* Serial port is closing */ diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index f0b98e5a5473..ba9506f322b4 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -275,6 +275,5 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op); /* serial subtype definitions */ #define SERIAL_TYPE_NORMAL 1 -#define SERIAL_TYPE_CALLOUT 2 #endif /* #ifdef _LINUX_TTY_DRIVER_H */ |
