android打印机没反应了,解决Android设备插入打印机无法启动

diff --git a/kernel/drivers/usb/class/usblp.c b/kernel/drivers/usb/cl

index 9eca405..b528437 100755

--- a/kernel/drivers/usb/class/usblp.c

+++ b/kernel/drivers/usb/class/usblp.c

@@ -1046,8 +1046,13 @@ static const struct file_operations usblp_fops

.llseek = noop_llseek,

};

+static struct device_type printer_type = {

+ .name = "printer",

+};

+

static char *usblp_devnode(struct device *dev, mode_t *mode)

{

+ dev->type=&printer_type;

return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev));

}

@@ -1072,6 +1077,7 @@ static ssize_t usblp_show_ieee1284_id(struct de

static DEVICE_ATTR(ieee1284_id, S_IRUGO, usblp_show_ieee1284_id, NUL

+

static int usblp_probe(struct usb_interface *intf,

const struct usb_device_id *id)

{

@@ -1079,6 +1085,8 @@ static int usblp_probe(struct usb_interface *in

struct usblp *usblp;

int protocol;

int retval;

+ //dev->children[0]->dev.type=&printer_type;

+ //dev->dev.type=&printer_type;

/* Malloc and start initializing usblp structure so we can us

* directly. */注:注释的那两条是测试的过但是不成功的方法。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值