Commit 33a5b406 authored by Jody McIntyre's avatar Jody McIntyre

Change some variables and functions that were needlessly global static.
Removes several functions that weren't used anywhere in the kernel.
Removes many unnecessary EXPORT_SYMBOL's.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarJody McIntyre <scjody@modernduck.com>
parent f49f60e4
......@@ -286,7 +286,7 @@ static struct hpsb_highlevel amdtp_highlevel;
#define OHCI1394_CONTEXT_DEAD 0x00000800
#define OHCI1394_CONTEXT_ACTIVE 0x00000400
void ohci1394_start_it_ctx(struct ti_ohci *ohci, int ctx,
static void ohci1394_start_it_ctx(struct ti_ohci *ohci, int ctx,
dma_addr_t first_cmd, int z, int cycle_match)
{
reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1 << ctx);
......@@ -298,13 +298,13 @@ void ohci1394_start_it_ctx(struct ti_ohci *ohci, int ctx,
OHCI1394_CONTEXT_RUN);
}
void ohci1394_wake_it_ctx(struct ti_ohci *ohci, int ctx)
static void ohci1394_wake_it_ctx(struct ti_ohci *ohci, int ctx)
{
reg_write(ohci, OHCI1394_IsoXmitContextControlSet + ctx * 16,
OHCI1394_CONTEXT_WAKE);
}
void ohci1394_stop_it_ctx(struct ti_ohci *ohci, int ctx, int synchronous)
static void ohci1394_stop_it_ctx(struct ti_ohci *ohci, int ctx, int synchronous)
{
u32 control;
int wait;
......@@ -530,7 +530,7 @@ static __inline__ int fraction_ceil(struct fraction *frac)
return frac->integer + (frac->numerator > 0 ? 1 : 0);
}
void packet_initialize(struct packet *p, struct packet *next)
static void packet_initialize(struct packet *p, struct packet *next)
{
/* Here we initialize the dma descriptor block for
* transferring one iso packet. We use two descriptors per
......@@ -559,7 +559,7 @@ void packet_initialize(struct packet *p, struct packet *next)
p->db->payload_desc.status = 0;
}
struct packet_list *packet_list_alloc(struct stream *s)
static struct packet_list *packet_list_alloc(struct stream *s)
{
int i;
struct packet_list *pl;
......@@ -588,7 +588,7 @@ struct packet_list *packet_list_alloc(struct stream *s)
return pl;
}
void packet_list_free(struct packet_list *pl, struct stream *s)
static void packet_list_free(struct packet_list *pl, struct stream *s)
{
int i;
......@@ -1010,7 +1010,7 @@ static int stream_configure(struct stream *s, int cmd, struct amdtp_ioctl *cfg)
return 0;
}
struct stream *stream_alloc(struct amdtp_host *host)
static struct stream *stream_alloc(struct amdtp_host *host)
{
struct stream *s;
unsigned long flags;
......@@ -1062,7 +1062,7 @@ struct stream *stream_alloc(struct amdtp_host *host)
return s;
}
void stream_free(struct stream *s)
static void stream_free(struct stream *s)
{
unsigned long flags;
......
......@@ -1277,7 +1277,7 @@ static void do_dv1394_shutdown(struct video_card *video, int free_dv_buf)
error-prone code in dv1394.
*/
int dv1394_mmap(struct file *file, struct vm_area_struct *vma)
static int dv1394_mmap(struct file *file, struct vm_area_struct *vma)
{
struct video_card *video = file_to_video_card(file);
int retval = -EINVAL;
......
......@@ -173,18 +173,6 @@ void hpsb_set_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host, un
}
unsigned long hpsb_get_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host)
{
struct hl_host_info *hi;
hi = hl_get_hostinfo(hl, host);
if (hi)
return hi->key;
return 0;
}
void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key)
{
struct hl_host_info *hi;
......@@ -206,26 +194,6 @@ void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key)
}
struct hpsb_host *hpsb_get_host_bykey(struct hpsb_highlevel *hl, unsigned long key)
{
struct hl_host_info *hi;
struct hpsb_host *host = NULL;
if (!hl)
return NULL;
read_lock(&hl->host_info_lock);
list_for_each_entry(hi, &hl->host_info_list, list) {
if (hi->key == key) {
host = hi->host;
break;
}
}
read_unlock(&hl->host_info_lock);
return host;
}
static int highlevel_for_each_host_reg(struct hpsb_host *host, void *__data)
{
struct hpsb_highlevel *hl = __data;
......
......@@ -79,6 +79,7 @@ static void dump_packet(const char *text, quadlet_t *data, int size)
#define dump_packet(x,y,z)
#endif
static void abort_requests(struct hpsb_host *host);
static void queue_packet_complete(struct hpsb_packet *packet);
......@@ -939,7 +940,7 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size,
}
void abort_requests(struct hpsb_host *host)
static void abort_requests(struct hpsb_host *host)
{
struct hpsb_packet *packet;
struct sk_buff *skb;
......@@ -1002,7 +1003,7 @@ void abort_timedouts(unsigned long __opaque)
* the stack. */
static int khpsbpkt_pid = -1, khpsbpkt_kill;
static DECLARE_COMPLETION(khpsbpkt_complete);
struct sk_buff_head hpsbpkt_queue;
static struct sk_buff_head hpsbpkt_queue;
static DECLARE_MUTEX_LOCKED(khpsbpkt_sig);
......@@ -1221,8 +1222,6 @@ EXPORT_SYMBOL(hpsb_make_isopacket);
EXPORT_SYMBOL(hpsb_read);
EXPORT_SYMBOL(hpsb_write);
EXPORT_SYMBOL(hpsb_lock);
EXPORT_SYMBOL(hpsb_lock64);
EXPORT_SYMBOL(hpsb_send_gasp);
EXPORT_SYMBOL(hpsb_packet_success);
/** highlevel.c **/
......@@ -1234,28 +1233,18 @@ EXPORT_SYMBOL(hpsb_allocate_and_register_addrspace);
EXPORT_SYMBOL(hpsb_listen_channel);
EXPORT_SYMBOL(hpsb_unlisten_channel);
EXPORT_SYMBOL(hpsb_get_hostinfo);
EXPORT_SYMBOL(hpsb_get_host_bykey);
EXPORT_SYMBOL(hpsb_create_hostinfo);
EXPORT_SYMBOL(hpsb_destroy_hostinfo);
EXPORT_SYMBOL(hpsb_set_hostinfo_key);
EXPORT_SYMBOL(hpsb_get_hostinfo_key);
EXPORT_SYMBOL(hpsb_get_hostinfo_bykey);
EXPORT_SYMBOL(hpsb_set_hostinfo);
EXPORT_SYMBOL(highlevel_read);
EXPORT_SYMBOL(highlevel_write);
EXPORT_SYMBOL(highlevel_lock);
EXPORT_SYMBOL(highlevel_lock64);
EXPORT_SYMBOL(highlevel_add_host);
EXPORT_SYMBOL(highlevel_remove_host);
EXPORT_SYMBOL(highlevel_host_reset);
/** nodemgr.c **/
EXPORT_SYMBOL(hpsb_guid_get_entry);
EXPORT_SYMBOL(hpsb_nodeid_get_entry);
EXPORT_SYMBOL(hpsb_node_fill_packet);
EXPORT_SYMBOL(hpsb_node_read);
EXPORT_SYMBOL(hpsb_node_write);
EXPORT_SYMBOL(hpsb_node_lock);
EXPORT_SYMBOL(hpsb_register_protocol);
EXPORT_SYMBOL(hpsb_unregister_protocol);
EXPORT_SYMBOL(ieee1394_bus_type);
......@@ -1299,27 +1288,14 @@ EXPORT_SYMBOL(hpsb_iso_recv_flush);
EXPORT_SYMBOL(csr1212_create_csr);
EXPORT_SYMBOL(csr1212_init_local_csr);
EXPORT_SYMBOL(csr1212_new_immediate);
EXPORT_SYMBOL(csr1212_new_leaf);
EXPORT_SYMBOL(csr1212_new_csr_offset);
EXPORT_SYMBOL(csr1212_new_directory);
EXPORT_SYMBOL(csr1212_associate_keyval);
EXPORT_SYMBOL(csr1212_attach_keyval_to_directory);
EXPORT_SYMBOL(csr1212_new_extended_immediate);
EXPORT_SYMBOL(csr1212_new_extended_leaf);
EXPORT_SYMBOL(csr1212_new_descriptor_leaf);
EXPORT_SYMBOL(csr1212_new_textual_descriptor_leaf);
EXPORT_SYMBOL(csr1212_new_string_descriptor_leaf);
EXPORT_SYMBOL(csr1212_new_icon_descriptor_leaf);
EXPORT_SYMBOL(csr1212_new_modifiable_descriptor_leaf);
EXPORT_SYMBOL(csr1212_new_keyword_leaf);
EXPORT_SYMBOL(csr1212_detach_keyval_from_directory);
EXPORT_SYMBOL(csr1212_disassociate_keyval);
EXPORT_SYMBOL(csr1212_release_keyval);
EXPORT_SYMBOL(csr1212_destroy_csr);
EXPORT_SYMBOL(csr1212_read);
EXPORT_SYMBOL(csr1212_generate_positions);
EXPORT_SYMBOL(csr1212_generate_layout_order);
EXPORT_SYMBOL(csr1212_fill_cache);
EXPORT_SYMBOL(csr1212_generate_csr_image);
EXPORT_SYMBOL(csr1212_parse_keyval);
EXPORT_SYMBOL(csr1212_parse_csr);
......
......@@ -89,7 +89,6 @@ static inline struct hpsb_packet *driver_packet(struct list_head *l)
}
void abort_timedouts(unsigned long __opaque);
void abort_requests(struct hpsb_host *host);
struct hpsb_packet *hpsb_alloc_packet(size_t data_size);
void hpsb_free_packet(struct hpsb_packet *packet);
......
......@@ -566,34 +566,6 @@ int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation,
return retval;
}
int hpsb_lock64(struct hpsb_host *host, nodeid_t node, unsigned int generation,
u64 addr, int extcode, octlet_t *data, octlet_t arg)
{
struct hpsb_packet *packet;
int retval = 0;
BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet
packet = hpsb_make_lock64packet(host, node, addr, extcode, data, arg);
if (!packet)
return -ENOMEM;
packet->generation = generation;
retval = hpsb_send_packet_and_wait(packet);
if (retval < 0)
goto hpsb_lock64_fail;
retval = hpsb_packet_success(packet);
if (retval == 0)
*data = (u64)packet->data[1] << 32 | packet->data[0];
hpsb_lock64_fail:
hpsb_free_tlabel(packet);
hpsb_free_packet(packet);
return retval;
}
int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation,
quadlet_t *buffer, size_t length, u32 specifier_id,
......
......@@ -146,7 +146,7 @@ static void ne_cls_release(struct class_device *class_dev)
put_device(&container_of((class_dev), struct node_entry, class_dev)->device);
}
struct class nodemgr_ne_class = {
static struct class nodemgr_ne_class = {
.name = "ieee1394_node",
.release = ne_cls_release,
};
......@@ -158,7 +158,7 @@ static void ud_cls_release(struct class_device *class_dev)
/* The name here is only so that unit directory hotplug works with old
* style hotplug, which only ever did unit directories anyway. */
struct class nodemgr_ud_class = {
static struct class nodemgr_ud_class = {
.name = "ieee1394",
.release = ud_cls_release,
.hotplug = nodemgr_hotplug,
......@@ -1564,29 +1564,6 @@ static int nodemgr_host_thread(void *__hi)
complete_and_exit(&hi->exited, 0);
}
struct node_entry *hpsb_guid_get_entry(u64 guid)
{
struct node_entry *ne;
down(&nodemgr_serialize);
ne = find_entry_by_guid(guid);
up(&nodemgr_serialize);
return ne;
}
struct node_entry *hpsb_nodeid_get_entry(struct hpsb_host *host, nodeid_t nodeid)
{
struct node_entry *ne;
down(&nodemgr_serialize);
ne = find_entry_by_nodeid(host, nodeid);
up(&nodemgr_serialize);
return ne;
}
int nodemgr_for_each_host(void *__data, int (*cb)(struct hpsb_host *, void *))
{
struct class *class = &hpsb_host_class;
......@@ -1629,16 +1606,6 @@ void hpsb_node_fill_packet(struct node_entry *ne, struct hpsb_packet *pkt)
pkt->node_id = ne->nodeid;
}
int hpsb_node_read(struct node_entry *ne, u64 addr,
quadlet_t *buffer, size_t length)
{
unsigned int generation = ne->generation;
barrier();
return hpsb_read(ne->host, ne->nodeid, generation,
addr, buffer, length);
}
int hpsb_node_write(struct node_entry *ne, u64 addr,
quadlet_t *buffer, size_t length)
{
......@@ -1649,16 +1616,6 @@ int hpsb_node_write(struct node_entry *ne, u64 addr,
addr, buffer, length);
}
int hpsb_node_lock(struct node_entry *ne, u64 addr,
int extcode, quadlet_t *data, quadlet_t arg)
{
unsigned int generation = ne->generation;
barrier();
return hpsb_lock(ne->host, ne->nodeid, generation,
addr, extcode, data, arg);
}
static void nodemgr_add_host(struct hpsb_host *host)
{
struct host_info *hi;
......
......@@ -232,7 +232,7 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id,
static struct scsi_host_template scsi_driver_template;
const u8 sbp2_speedto_max_payload[] = { 0x7, 0x8, 0x9, 0xA, 0xB, 0xC };
static const u8 sbp2_speedto_max_payload[] = { 0x7, 0x8, 0x9, 0xA, 0xB, 0xC };
static void sbp2_host_reset(struct hpsb_host *host);
......@@ -376,7 +376,7 @@ static void sbp2_free_packet(struct hpsb_packet *packet)
/* This is much like hpsb_node_write(), except it ignores the response
* subaction and returns immediately. Can be used from interrupts.
*/
int sbp2util_node_write_no_wait(struct node_entry *ne, u64 addr,
static int sbp2util_node_write_no_wait(struct node_entry *ne, u64 addr,
quadlet_t *buffer, size_t length)
{
struct hpsb_packet *packet;
......
......@@ -157,8 +157,8 @@ printk(level "video1394: " fmt "\n" , ## args)
#define PRINT(level, card, fmt, args...) \
printk(level "video1394_%d: " fmt "\n" , card , ## args)
void wakeup_dma_ir_ctx(unsigned long l);
void wakeup_dma_it_ctx(unsigned long l);
static void wakeup_dma_ir_ctx(unsigned long l);
static void wakeup_dma_it_ctx(unsigned long l);
static struct hpsb_highlevel video1394_highlevel;
......@@ -498,7 +498,7 @@ find_ctx(struct list_head *list, int type, int channel)
return NULL;
}
void wakeup_dma_ir_ctx(unsigned long l)
static void wakeup_dma_ir_ctx(unsigned long l)
{
struct dma_iso_ctx *d = (struct dma_iso_ctx *) l;
int i;
......@@ -571,7 +571,7 @@ static inline void put_timestamp(struct ti_ohci *ohci, struct dma_iso_ctx * d,
#endif
}
void wakeup_dma_it_ctx(unsigned long l)
static void wakeup_dma_it_ctx(unsigned long l)
{
struct dma_iso_ctx *d = (struct dma_iso_ctx *) l;
struct ti_ohci *ohci = d->ohci;
......@@ -1188,7 +1188,7 @@ static long video1394_ioctl(struct file *file, unsigned int cmd, unsigned long a
* But e.g. pte_alloc() does not work in modules ... :-(
*/
int video1394_mmap(struct file *file, struct vm_area_struct *vma)
static int video1394_mmap(struct file *file, struct vm_area_struct *vma)
{
struct file_ctx *ctx = (struct file_ctx *)file->private_data;
int res = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment