mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-11-01 00:28:51 +01:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
48
drivers/misc/samsung/scsc/scsc_loopback.c
Normal file
48
drivers/misc/samsung/scsc/scsc_loopback.c
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/**
|
||||
* Loopback Protocol (Implementation)
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <hydra/trace.h>
|
||||
|
||||
#include "scsc_loopback.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* Handle data received on port by sending it back.
|
||||
*/
|
||||
static void scsc_loopback_port_recv(
|
||||
struct scsc_mport *port,
|
||||
const unsigned char *data,
|
||||
size_t count)
|
||||
{
|
||||
os_trace_dbg("%s: @%p, count %zu", __func__, port, count);
|
||||
|
||||
scsc_mport_emit(port, data, count);
|
||||
}
|
||||
|
||||
static const struct scsc_mport_ops scsc_loopback_port_ops = {
|
||||
scsc_loopback_port_recv
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
void scsc_loopback_init(struct scsc_loopback *loopback)
|
||||
{
|
||||
os_trace_dbg("%s: @%p", __func__, loopback);
|
||||
|
||||
scsc_mport_init(&loopback->port, &scsc_loopback_port_ops);
|
||||
}
|
||||
|
||||
void scsc_loopback_deinit(struct scsc_loopback *loopback)
|
||||
{
|
||||
}
|
||||
|
||||
struct scsc_mport *scsc_loopback_get_port(
|
||||
struct scsc_loopback *loopback)
|
||||
{
|
||||
return &loopback->port;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue