Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
aab81e47
Commit
aab81e47
authored
Aug 14, 2013
by
Vinod Koul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/of' into for-linus
parents
52a9d179
7bb587f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
drivers/dma/dmaengine.c
drivers/dma/dmaengine.c
+26
-0
include/linux/dmaengine.h
include/linux/dmaengine.h
+1
-0
No files found.
drivers/dma/dmaengine.c
View file @
aab81e47
...
...
@@ -503,6 +503,32 @@ static struct dma_chan *private_candidate(const dma_cap_mask_t *mask,
return
NULL
;
}
/**
* dma_request_channel - try to get specific channel exclusively
* @chan: target channel
*/
struct
dma_chan
*
dma_get_slave_channel
(
struct
dma_chan
*
chan
)
{
int
err
=
-
EBUSY
;
/* lock against __dma_request_channel */
mutex_lock
(
&
dma_list_mutex
);
if
(
chan
->
client_count
==
0
)
err
=
dma_chan_get
(
chan
);
else
chan
=
NULL
;
mutex_unlock
(
&
dma_list_mutex
);
if
(
err
)
pr_debug
(
"%s: failed to get %s: (%d)
\n
"
,
__func__
,
dma_chan_name
(
chan
),
err
);
return
chan
;
}
EXPORT_SYMBOL_GPL
(
dma_get_slave_channel
);
/**
* dma_request_channel - try to allocate an exclusive channel
* @mask: capabilities that the channel must satisfy
...
...
include/linux/dmaengine.h
View file @
aab81e47
...
...
@@ -995,6 +995,7 @@ int dma_async_device_register(struct dma_device *device);
void
dma_async_device_unregister
(
struct
dma_device
*
device
);
void
dma_run_dependencies
(
struct
dma_async_tx_descriptor
*
tx
);
struct
dma_chan
*
dma_find_channel
(
enum
dma_transaction_type
tx_type
);
struct
dma_chan
*
dma_get_slave_channel
(
struct
dma_chan
*
chan
);
struct
dma_chan
*
net_dma_find_channel
(
void
);
#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
#define dma_request_slave_channel_compat(mask, x, y, dev, name) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment