Skip to content

Commit

Permalink
staging: comedi: use EXPORT_SYMBOL_GPL() for all exported symbols
Browse files Browse the repository at this point in the history
Comedi is licensed under GPL. Some if its exports are currently
EXPORT_SYMBOL() and others are EXPORT_SYMBOL_GPL(). Change them all
to EXPORT_SYMBOL_GPL() and see if anyone reports any fall out.

If any of the symbols "need" to be EXPORT_SYMBOL() they will be
addressed as needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 12, 2013
1 parent dd671a3 commit 5660e74
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 61 deletions.
18 changes: 9 additions & 9 deletions drivers/staging/comedi/comedi_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ unsigned int comedi_buf_write_alloc(struct comedi_async *async,
{
return __comedi_buf_write_alloc(async, nbytes, 0);
}
EXPORT_SYMBOL(comedi_buf_write_alloc);
EXPORT_SYMBOL_GPL(comedi_buf_write_alloc);

/*
* munging is applied to data by core as it passes between user
Expand Down Expand Up @@ -263,7 +263,7 @@ unsigned int comedi_buf_write_free(struct comedi_async *async,

return nbytes;
}
EXPORT_SYMBOL(comedi_buf_write_free);
EXPORT_SYMBOL_GPL(comedi_buf_write_free);

unsigned int comedi_buf_read_n_available(struct comedi_async *async)
{
Expand All @@ -282,7 +282,7 @@ unsigned int comedi_buf_read_n_available(struct comedi_async *async)

return num_bytes;
}
EXPORT_SYMBOL(comedi_buf_read_n_available);
EXPORT_SYMBOL_GPL(comedi_buf_read_n_available);

/* allocates a chunk for the reader from filled (and munged) buffer space */
unsigned int comedi_buf_read_alloc(struct comedi_async *async,
Expand All @@ -304,7 +304,7 @@ unsigned int comedi_buf_read_alloc(struct comedi_async *async,

return nbytes;
}
EXPORT_SYMBOL(comedi_buf_read_alloc);
EXPORT_SYMBOL_GPL(comedi_buf_read_alloc);

static unsigned int comedi_buf_read_n_allocated(struct comedi_async *async)
{
Expand Down Expand Up @@ -332,7 +332,7 @@ unsigned int comedi_buf_read_free(struct comedi_async *async,
async->buf_read_ptr %= async->prealloc_bufsz;
return nbytes;
}
EXPORT_SYMBOL(comedi_buf_read_free);
EXPORT_SYMBOL_GPL(comedi_buf_read_free);

int comedi_buf_put(struct comedi_async *async, short x)
{
Expand All @@ -346,7 +346,7 @@ int comedi_buf_put(struct comedi_async *async, short x)
comedi_buf_write_free(async, sizeof(short));
return 1;
}
EXPORT_SYMBOL(comedi_buf_put);
EXPORT_SYMBOL_GPL(comedi_buf_put);

int comedi_buf_get(struct comedi_async *async, short *x)
{
Expand All @@ -359,7 +359,7 @@ int comedi_buf_get(struct comedi_async *async, short *x)
comedi_buf_read_free(async, sizeof(short));
return 1;
}
EXPORT_SYMBOL(comedi_buf_get);
EXPORT_SYMBOL_GPL(comedi_buf_get);

void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset,
const void *data, unsigned int num_bytes)
Expand All @@ -385,7 +385,7 @@ void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset,
write_ptr = 0;
}
}
EXPORT_SYMBOL(comedi_buf_memcpy_to);
EXPORT_SYMBOL_GPL(comedi_buf_memcpy_to);

void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset,
void *dest, unsigned int nbytes)
Expand All @@ -412,4 +412,4 @@ void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset,
read_ptr = 0;
}
}
EXPORT_SYMBOL(comedi_buf_memcpy_from);
EXPORT_SYMBOL_GPL(comedi_buf_memcpy_from);
6 changes: 3 additions & 3 deletions drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

#ifdef CONFIG_COMEDI_DEBUG
int comedi_debug;
EXPORT_SYMBOL(comedi_debug);
EXPORT_SYMBOL_GPL(comedi_debug);
module_param(comedi_debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(comedi_debug,
"enable comedi core and driver debugging if non-zero (default 0)"
Expand Down Expand Up @@ -2344,7 +2344,7 @@ void comedi_error(const struct comedi_device *dev, const char *s)
{
dev_err(dev->class_dev, "%s: %s\n", dev->driver->driver_name, s);
}
EXPORT_SYMBOL(comedi_error);
EXPORT_SYMBOL_GPL(comedi_error);

void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
{
Expand Down Expand Up @@ -2387,7 +2387,7 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
}
s->async->events = 0;
}
EXPORT_SYMBOL(comedi_event);
EXPORT_SYMBOL_GPL(comedi_event);

/* Note: the ->mutex is pre-locked on successful return */
struct comedi_device *comedi_alloc_board_minor(struct device *hardware_device)
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ int comedi_driver_register(struct comedi_driver *driver)

return 0;
}
EXPORT_SYMBOL(comedi_driver_register);
EXPORT_SYMBOL_GPL(comedi_driver_register);

int comedi_driver_unregister(struct comedi_driver *driver)
{
Expand Down Expand Up @@ -532,4 +532,4 @@ int comedi_driver_unregister(struct comedi_driver *driver)
}
return -EINVAL;
}
EXPORT_SYMBOL(comedi_driver_unregister);
EXPORT_SYMBOL_GPL(comedi_driver_unregister);
8 changes: 4 additions & 4 deletions drivers/staging/comedi/drivers/8255.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void subdev_8255_interrupt(struct comedi_device *dev,

comedi_event(dev, s);
}
EXPORT_SYMBOL(subdev_8255_interrupt);
EXPORT_SYMBOL_GPL(subdev_8255_interrupt);

static int subdev_8255_insn(struct comedi_device *dev,
struct comedi_subdevice *s,
Expand Down Expand Up @@ -314,7 +314,7 @@ int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s,

return 0;
}
EXPORT_SYMBOL(subdev_8255_init);
EXPORT_SYMBOL_GPL(subdev_8255_init);

int subdev_8255_init_irq(struct comedi_device *dev, struct comedi_subdevice *s,
int (*io) (int, int, int, unsigned long),
Expand All @@ -332,13 +332,13 @@ int subdev_8255_init_irq(struct comedi_device *dev, struct comedi_subdevice *s,

return 0;
}
EXPORT_SYMBOL(subdev_8255_init_irq);
EXPORT_SYMBOL_GPL(subdev_8255_init_irq);

void subdev_8255_cleanup(struct comedi_device *dev, struct comedi_subdevice *s)
{
kfree(s->private);
}
EXPORT_SYMBOL(subdev_8255_cleanup);
EXPORT_SYMBOL_GPL(subdev_8255_cleanup);

/*
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/comedi/drivers/comedi_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *subd,

return num_bytes;
}
EXPORT_SYMBOL(cfc_write_array_to_buffer);
EXPORT_SYMBOL_GPL(cfc_write_array_to_buffer);

unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *subd,
void *data, unsigned int num_bytes)
Expand All @@ -83,7 +83,7 @@ unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *subd,

return num_bytes;
}
EXPORT_SYMBOL(cfc_read_array_from_buffer);
EXPORT_SYMBOL_GPL(cfc_read_array_from_buffer);

unsigned int cfc_handle_events(struct comedi_device *dev,
struct comedi_subdevice *subd)
Expand All @@ -100,7 +100,7 @@ unsigned int cfc_handle_events(struct comedi_device *dev,

return events;
}
EXPORT_SYMBOL(cfc_handle_events);
EXPORT_SYMBOL_GPL(cfc_handle_events);

MODULE_AUTHOR("Frank Mori Hess <fmhess@users.sourceforge.net>");
MODULE_DESCRIPTION("Shared functions for Comedi low-level drivers");
Expand Down
46 changes: 23 additions & 23 deletions drivers/staging/comedi/drivers/mite.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct mite_struct *mite_alloc(struct pci_dev *pcidev)
}
return mite;
}
EXPORT_SYMBOL(mite_alloc);
EXPORT_SYMBOL_GPL(mite_alloc);

static void dump_chip_signature(u32 csigr_bits)
{
Expand Down Expand Up @@ -169,13 +169,13 @@ int mite_setup2(struct mite_struct *mite, unsigned use_iodwbsr_1)
dev_info(&mite->pcidev->dev, "fifo size is %i.\n", mite->fifo_size);
return 0;
}
EXPORT_SYMBOL(mite_setup2);
EXPORT_SYMBOL_GPL(mite_setup2);

int mite_setup(struct mite_struct *mite)
{
return mite_setup2(mite, 0);
}
EXPORT_SYMBOL(mite_setup);
EXPORT_SYMBOL_GPL(mite_setup);

void mite_unsetup(struct mite_struct *mite)
{
Expand All @@ -195,7 +195,7 @@ void mite_unsetup(struct mite_struct *mite)
if (mite->mite_phys_addr)
mite->mite_phys_addr = 0;
}
EXPORT_SYMBOL(mite_unsetup);
EXPORT_SYMBOL_GPL(mite_unsetup);

struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite)
{
Expand All @@ -214,7 +214,7 @@ struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite)
ring->descriptors_dma_addr = 0;
return ring;
};
EXPORT_SYMBOL(mite_alloc_ring);
EXPORT_SYMBOL_GPL(mite_alloc_ring);

void mite_free_ring(struct mite_dma_descriptor_ring *ring)
{
Expand All @@ -230,7 +230,7 @@ void mite_free_ring(struct mite_dma_descriptor_ring *ring)
kfree(ring);
}
};
EXPORT_SYMBOL(mite_free_ring);
EXPORT_SYMBOL_GPL(mite_free_ring);

struct mite_channel *mite_request_channel_in_range(struct mite_struct *mite,
struct
Expand All @@ -257,7 +257,7 @@ struct mite_channel *mite_request_channel_in_range(struct mite_struct *mite,
spin_unlock_irqrestore(&mite->lock, flags);
return channel;
}
EXPORT_SYMBOL(mite_request_channel_in_range);
EXPORT_SYMBOL_GPL(mite_request_channel_in_range);

void mite_release_channel(struct mite_channel *mite_chan)
{
Expand All @@ -284,7 +284,7 @@ void mite_release_channel(struct mite_channel *mite_chan)
}
spin_unlock_irqrestore(&mite->lock, flags);
}
EXPORT_SYMBOL(mite_release_channel);
EXPORT_SYMBOL_GPL(mite_release_channel);

void mite_dma_arm(struct mite_channel *mite_chan)
{
Expand All @@ -307,7 +307,7 @@ void mite_dma_arm(struct mite_channel *mite_chan)
spin_unlock_irqrestore(&mite->lock, flags);
/* mite_dma_tcr(mite, channel); */
}
EXPORT_SYMBOL(mite_dma_arm);
EXPORT_SYMBOL_GPL(mite_dma_arm);

/**************************************/

Expand Down Expand Up @@ -364,7 +364,7 @@ int mite_buf_change(struct mite_dma_descriptor_ring *ring,
smp_wmb();
return 0;
}
EXPORT_SYMBOL(mite_buf_change);
EXPORT_SYMBOL_GPL(mite_buf_change);

void mite_prep_dma(struct mite_channel *mite_chan,
unsigned int num_device_bits, unsigned int num_memory_bits)
Expand Down Expand Up @@ -455,7 +455,7 @@ void mite_prep_dma(struct mite_channel *mite_chan,

MDPRINTK("exit mite_prep_dma\n");
}
EXPORT_SYMBOL(mite_prep_dma);
EXPORT_SYMBOL_GPL(mite_prep_dma);

static u32 mite_device_bytes_transferred(struct mite_channel *mite_chan)
{
Expand All @@ -469,7 +469,7 @@ u32 mite_bytes_in_transit(struct mite_channel *mite_chan)
return readl(mite->mite_io_addr +
MITE_FCR(mite_chan->channel)) & 0x000000FF;
}
EXPORT_SYMBOL(mite_bytes_in_transit);
EXPORT_SYMBOL_GPL(mite_bytes_in_transit);

/* returns lower bound for number of bytes transferred from device to memory */
u32 mite_bytes_written_to_memory_lb(struct mite_channel *mite_chan)
Expand All @@ -479,7 +479,7 @@ u32 mite_bytes_written_to_memory_lb(struct mite_channel *mite_chan)
device_byte_count = mite_device_bytes_transferred(mite_chan);
return device_byte_count - mite_bytes_in_transit(mite_chan);
}
EXPORT_SYMBOL(mite_bytes_written_to_memory_lb);
EXPORT_SYMBOL_GPL(mite_bytes_written_to_memory_lb);

/* returns upper bound for number of bytes transferred from device to memory */
u32 mite_bytes_written_to_memory_ub(struct mite_channel *mite_chan)
Expand All @@ -489,7 +489,7 @@ u32 mite_bytes_written_to_memory_ub(struct mite_channel *mite_chan)
in_transit_count = mite_bytes_in_transit(mite_chan);
return mite_device_bytes_transferred(mite_chan) - in_transit_count;
}
EXPORT_SYMBOL(mite_bytes_written_to_memory_ub);
EXPORT_SYMBOL_GPL(mite_bytes_written_to_memory_ub);

/* returns lower bound for number of bytes read from memory to device */
u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan)
Expand All @@ -499,7 +499,7 @@ u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan)
device_byte_count = mite_device_bytes_transferred(mite_chan);
return device_byte_count + mite_bytes_in_transit(mite_chan);
}
EXPORT_SYMBOL(mite_bytes_read_from_memory_lb);
EXPORT_SYMBOL_GPL(mite_bytes_read_from_memory_lb);

/* returns upper bound for number of bytes read from memory to device */
u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan)
Expand All @@ -509,7 +509,7 @@ u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan)
in_transit_count = mite_bytes_in_transit(mite_chan);
return mite_device_bytes_transferred(mite_chan) + in_transit_count;
}
EXPORT_SYMBOL(mite_bytes_read_from_memory_ub);
EXPORT_SYMBOL_GPL(mite_bytes_read_from_memory_ub);

unsigned mite_dma_tcr(struct mite_channel *mite_chan)
{
Expand All @@ -524,7 +524,7 @@ unsigned mite_dma_tcr(struct mite_channel *mite_chan)

return tcr;
}
EXPORT_SYMBOL(mite_dma_tcr);
EXPORT_SYMBOL_GPL(mite_dma_tcr);

void mite_dma_disarm(struct mite_channel *mite_chan)
{
Expand All @@ -535,7 +535,7 @@ void mite_dma_disarm(struct mite_channel *mite_chan)
chor = CHOR_ABORT;
writel(chor, mite->mite_io_addr + MITE_CHOR(mite_chan->channel));
}
EXPORT_SYMBOL(mite_dma_disarm);
EXPORT_SYMBOL_GPL(mite_dma_disarm);

int mite_sync_input_dma(struct mite_channel *mite_chan,
struct comedi_async *async)
Expand Down Expand Up @@ -573,7 +573,7 @@ int mite_sync_input_dma(struct mite_channel *mite_chan,
async->events |= COMEDI_CB_BLOCK;
return 0;
}
EXPORT_SYMBOL(mite_sync_input_dma);
EXPORT_SYMBOL_GPL(mite_sync_input_dma);

int mite_sync_output_dma(struct mite_channel *mite_chan,
struct comedi_async *async)
Expand Down Expand Up @@ -611,7 +611,7 @@ int mite_sync_output_dma(struct mite_channel *mite_chan,
}
return 0;
}
EXPORT_SYMBOL(mite_sync_output_dma);
EXPORT_SYMBOL_GPL(mite_sync_output_dma);

unsigned mite_get_status(struct mite_channel *mite_chan)
{
Expand All @@ -630,7 +630,7 @@ unsigned mite_get_status(struct mite_channel *mite_chan)
spin_unlock_irqrestore(&mite->lock, flags);
return status;
}
EXPORT_SYMBOL(mite_get_status);
EXPORT_SYMBOL_GPL(mite_get_status);

int mite_done(struct mite_channel *mite_chan)
{
Expand All @@ -644,7 +644,7 @@ int mite_done(struct mite_channel *mite_chan)
spin_unlock_irqrestore(&mite->lock, flags);
return done;
}
EXPORT_SYMBOL(mite_done);
EXPORT_SYMBOL_GPL(mite_done);

#ifdef DEBUG_MITE

Expand Down Expand Up @@ -777,7 +777,7 @@ void mite_dump_regs(struct mite_channel *mite_chan)
value = readl(mite_io_addr + offset);
pr_debug("mite status[FCR] at 0x%08x =0x%08x\n", offset, value);
}
EXPORT_SYMBOL(mite_dump_regs);
EXPORT_SYMBOL_GPL(mite_dump_regs);
#endif

static int __init mite_module_init(void)
Expand Down
Loading

0 comments on commit 5660e74

Please sign in to comment.