提交 94b0522a 编写于 作者: L Linus Torvalds

Merge branch 's5p-fixes-for-linus' of...

Merge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung

* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: SAMSUNG: DMA Cleanup as per sparse
  ARM: SAMSUNG: Check NULL return from irq_alloc_generic_chip
...@@ -113,7 +113,7 @@ static struct s3c2410_dma_chan *s3c64xx_dma_map_channel(unsigned int channel) ...@@ -113,7 +113,7 @@ static struct s3c2410_dma_chan *s3c64xx_dma_map_channel(unsigned int channel)
return chan; return chan;
} }
int s3c2410_dma_config(unsigned int channel, int xferunit) int s3c2410_dma_config(enum dma_ch channel, int xferunit)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
...@@ -297,7 +297,7 @@ static int s3c64xx_dma_flush(struct s3c2410_dma_chan *chan) ...@@ -297,7 +297,7 @@ static int s3c64xx_dma_flush(struct s3c2410_dma_chan *chan)
return 0; return 0;
} }
int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op) int s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
...@@ -331,7 +331,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl); ...@@ -331,7 +331,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl);
* *
*/ */
int s3c2410_dma_enqueue(unsigned int channel, void *id, int s3c2410_dma_enqueue(enum dma_ch channel, void *id,
dma_addr_t data, int size) dma_addr_t data, int size)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
...@@ -415,7 +415,7 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, ...@@ -415,7 +415,7 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
EXPORT_SYMBOL(s3c2410_dma_enqueue); EXPORT_SYMBOL(s3c2410_dma_enqueue);
int s3c2410_dma_devconfig(unsigned int channel, int s3c2410_dma_devconfig(enum dma_ch channel,
enum s3c2410_dmasrc source, enum s3c2410_dmasrc source,
unsigned long devaddr) unsigned long devaddr)
{ {
...@@ -463,7 +463,7 @@ int s3c2410_dma_devconfig(unsigned int channel, ...@@ -463,7 +463,7 @@ int s3c2410_dma_devconfig(unsigned int channel,
EXPORT_SYMBOL(s3c2410_dma_devconfig); EXPORT_SYMBOL(s3c2410_dma_devconfig);
int s3c2410_dma_getposition(unsigned int channel, int s3c2410_dma_getposition(enum dma_ch channel,
dma_addr_t *src, dma_addr_t *dst) dma_addr_t *src, dma_addr_t *dst)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
...@@ -487,7 +487,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition); ...@@ -487,7 +487,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition);
* get control of an dma channel * get control of an dma channel
*/ */
int s3c2410_dma_request(unsigned int channel, int s3c2410_dma_request(enum dma_ch channel,
struct s3c2410_dma_client *client, struct s3c2410_dma_client *client,
void *dev) void *dev)
{ {
...@@ -533,7 +533,7 @@ EXPORT_SYMBOL(s3c2410_dma_request); ...@@ -533,7 +533,7 @@ EXPORT_SYMBOL(s3c2410_dma_request);
* allowed to go through. * allowed to go through.
*/ */
int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *client)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
unsigned long flags; unsigned long flags;
......
...@@ -712,7 +712,7 @@ static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel); ...@@ -712,7 +712,7 @@ static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel);
* get control of an dma channel * get control of an dma channel
*/ */
int s3c2410_dma_request(unsigned int channel, int s3c2410_dma_request(enum dma_ch channel,
struct s3c2410_dma_client *client, struct s3c2410_dma_client *client,
void *dev) void *dev)
{ {
...@@ -783,7 +783,7 @@ EXPORT_SYMBOL(s3c2410_dma_request); ...@@ -783,7 +783,7 @@ EXPORT_SYMBOL(s3c2410_dma_request);
* allowed to go through. * allowed to go through.
*/ */
int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *client)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
unsigned long flags; unsigned long flags;
...@@ -974,7 +974,7 @@ static int s3c2410_dma_started(struct s3c2410_dma_chan *chan) ...@@ -974,7 +974,7 @@ static int s3c2410_dma_started(struct s3c2410_dma_chan *chan)
} }
int int
s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op) s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
...@@ -1021,7 +1021,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl); ...@@ -1021,7 +1021,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl);
* xfersize: size of unit in bytes (1,2,4) * xfersize: size of unit in bytes (1,2,4)
*/ */
int s3c2410_dma_config(unsigned int channel, int s3c2410_dma_config(enum dma_ch channel,
int xferunit) int xferunit)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
...@@ -1100,7 +1100,7 @@ EXPORT_SYMBOL(s3c2410_dma_config); ...@@ -1100,7 +1100,7 @@ EXPORT_SYMBOL(s3c2410_dma_config);
* devaddr: physical address of the source * devaddr: physical address of the source
*/ */
int s3c2410_dma_devconfig(unsigned int channel, int s3c2410_dma_devconfig(enum dma_ch channel,
enum s3c2410_dmasrc source, enum s3c2410_dmasrc source,
unsigned long devaddr) unsigned long devaddr)
{ {
...@@ -1173,7 +1173,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig); ...@@ -1173,7 +1173,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig);
* returns the current transfer points for the dma source and destination * returns the current transfer points for the dma source and destination
*/ */
int s3c2410_dma_getposition(unsigned int channel, dma_addr_t *src, dma_addr_t *dst) int s3c2410_dma_getposition(enum dma_ch channel, dma_addr_t *src, dma_addr_t *dst)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
......
...@@ -41,7 +41,7 @@ struct s3c2410_dma_chan *s3c_dma_lookup_channel(unsigned int channel) ...@@ -41,7 +41,7 @@ struct s3c2410_dma_chan *s3c_dma_lookup_channel(unsigned int channel)
* irq? * irq?
*/ */
int s3c2410_dma_set_opfn(unsigned int channel, s3c2410_dma_opfn_t rtn) int s3c2410_dma_set_opfn(enum dma_ch channel, s3c2410_dma_opfn_t rtn)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
...@@ -56,7 +56,7 @@ int s3c2410_dma_set_opfn(unsigned int channel, s3c2410_dma_opfn_t rtn) ...@@ -56,7 +56,7 @@ int s3c2410_dma_set_opfn(unsigned int channel, s3c2410_dma_opfn_t rtn)
} }
EXPORT_SYMBOL(s3c2410_dma_set_opfn); EXPORT_SYMBOL(s3c2410_dma_set_opfn);
int s3c2410_dma_set_buffdone_fn(unsigned int channel, s3c2410_dma_cbfn_t rtn) int s3c2410_dma_set_buffdone_fn(enum dma_ch channel, s3c2410_dma_cbfn_t rtn)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
...@@ -71,7 +71,7 @@ int s3c2410_dma_set_buffdone_fn(unsigned int channel, s3c2410_dma_cbfn_t rtn) ...@@ -71,7 +71,7 @@ int s3c2410_dma_set_buffdone_fn(unsigned int channel, s3c2410_dma_cbfn_t rtn)
} }
EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn); EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn);
int s3c2410_dma_setflags(unsigned int channel, unsigned int flags) int s3c2410_dma_setflags(enum dma_ch channel, unsigned int flags)
{ {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
......
...@@ -42,6 +42,7 @@ struct s3c2410_dma_client { ...@@ -42,6 +42,7 @@ struct s3c2410_dma_client {
}; };
struct s3c2410_dma_chan; struct s3c2410_dma_chan;
enum dma_ch;
/* s3c2410_dma_cbfn_t /* s3c2410_dma_cbfn_t
* *
...@@ -62,7 +63,7 @@ typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *, ...@@ -62,7 +63,7 @@ typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *,
* request a dma channel exclusivley * request a dma channel exclusivley
*/ */
extern int s3c2410_dma_request(unsigned int channel, extern int s3c2410_dma_request(enum dma_ch channel,
struct s3c2410_dma_client *, void *dev); struct s3c2410_dma_client *, void *dev);
...@@ -71,14 +72,14 @@ extern int s3c2410_dma_request(unsigned int channel, ...@@ -71,14 +72,14 @@ extern int s3c2410_dma_request(unsigned int channel,
* change the state of the dma channel * change the state of the dma channel
*/ */
extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op); extern int s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op);
/* s3c2410_dma_setflags /* s3c2410_dma_setflags
* *
* set the channel's flags to a given state * set the channel's flags to a given state
*/ */
extern int s3c2410_dma_setflags(unsigned int channel, extern int s3c2410_dma_setflags(enum dma_ch channel,
unsigned int flags); unsigned int flags);
/* s3c2410_dma_free /* s3c2410_dma_free
...@@ -86,7 +87,7 @@ extern int s3c2410_dma_setflags(unsigned int channel, ...@@ -86,7 +87,7 @@ extern int s3c2410_dma_setflags(unsigned int channel,
* free the dma channel (will also abort any outstanding operations) * free the dma channel (will also abort any outstanding operations)
*/ */
extern int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *); extern int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *);
/* s3c2410_dma_enqueue /* s3c2410_dma_enqueue
* *
...@@ -95,7 +96,7 @@ extern int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *); ...@@ -95,7 +96,7 @@ extern int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *);
* drained before the buffer is given to the DMA system. * drained before the buffer is given to the DMA system.
*/ */
extern int s3c2410_dma_enqueue(unsigned int channel, void *id, extern int s3c2410_dma_enqueue(enum dma_ch channel, void *id,
dma_addr_t data, int size); dma_addr_t data, int size);
/* s3c2410_dma_config /* s3c2410_dma_config
...@@ -103,14 +104,14 @@ extern int s3c2410_dma_enqueue(unsigned int channel, void *id, ...@@ -103,14 +104,14 @@ extern int s3c2410_dma_enqueue(unsigned int channel, void *id,
* configure the dma channel * configure the dma channel
*/ */
extern int s3c2410_dma_config(unsigned int channel, int xferunit); extern int s3c2410_dma_config(enum dma_ch channel, int xferunit);
/* s3c2410_dma_devconfig /* s3c2410_dma_devconfig
* *
* configure the device we're talking to * configure the device we're talking to
*/ */
extern int s3c2410_dma_devconfig(unsigned int channel, extern int s3c2410_dma_devconfig(enum dma_ch channel,
enum s3c2410_dmasrc source, unsigned long devaddr); enum s3c2410_dmasrc source, unsigned long devaddr);
/* s3c2410_dma_getposition /* s3c2410_dma_getposition
...@@ -118,10 +119,10 @@ extern int s3c2410_dma_devconfig(unsigned int channel, ...@@ -118,10 +119,10 @@ extern int s3c2410_dma_devconfig(unsigned int channel,
* get the position that the dma transfer is currently at * get the position that the dma transfer is currently at
*/ */
extern int s3c2410_dma_getposition(unsigned int channel, extern int s3c2410_dma_getposition(enum dma_ch channel,
dma_addr_t *src, dma_addr_t *dest); dma_addr_t *src, dma_addr_t *dest);
extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn); extern int s3c2410_dma_set_opfn(enum dma_ch, s3c2410_dma_opfn_t rtn);
extern int s3c2410_dma_set_buffdone_fn(unsigned int, s3c2410_dma_cbfn_t rtn); extern int s3c2410_dma_set_buffdone_fn(enum dma_ch, s3c2410_dma_cbfn_t rtn);
...@@ -54,6 +54,13 @@ static void __init s3c_init_uart_irq(struct s3c_uart_irq *uirq) ...@@ -54,6 +54,13 @@ static void __init s3c_init_uart_irq(struct s3c_uart_irq *uirq)
gc = irq_alloc_generic_chip("s3c-uart", 1, uirq->base_irq, reg_base, gc = irq_alloc_generic_chip("s3c-uart", 1, uirq->base_irq, reg_base,
handle_level_irq); handle_level_irq);
if (!gc) {
pr_err("%s: irq_alloc_generic_chip for IRQ %u failed\n",
__func__, uirq->base_irq);
return;
}
ct = gc->chip_types; ct = gc->chip_types;
ct->chip.irq_ack = irq_gc_ack_set_bit; ct->chip.irq_ack = irq_gc_ack_set_bit;
ct->chip.irq_mask = irq_gc_mask_set_bit; ct->chip.irq_mask = irq_gc_mask_set_bit;
......
...@@ -54,6 +54,13 @@ void __init s3c_init_vic_timer_irq(unsigned int num, unsigned int timer_irq) ...@@ -54,6 +54,13 @@ void __init s3c_init_vic_timer_irq(unsigned int num, unsigned int timer_irq)
s3c_tgc = irq_alloc_generic_chip("s3c-timer", 1, timer_irq, s3c_tgc = irq_alloc_generic_chip("s3c-timer", 1, timer_irq,
S3C64XX_TINT_CSTAT, handle_level_irq); S3C64XX_TINT_CSTAT, handle_level_irq);
if (!s3c_tgc) {
pr_err("%s: irq_alloc_generic_chip for IRQ %d failed\n",
__func__, timer_irq);
return;
}
ct = s3c_tgc->chip_types; ct = s3c_tgc->chip_types;
ct->chip.irq_mask = irq_gc_mask_clr_bit; ct->chip.irq_mask = irq_gc_mask_clr_bit;
ct->chip.irq_unmask = irq_gc_mask_set_bit; ct->chip.irq_unmask = irq_gc_mask_set_bit;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册