From 3006d8909ca082cdcba539bd58d257f4ff3da618 Mon Sep 17 00:00:00 2001 From: Yonghua Yan Date: Wed, 8 Jun 2022 17:12:58 +0800 Subject: [PATCH] remove the sysfs notify from interrupt context Remove the sysfs notify for sysfs node from usb interrupt context, as sysfs_notify may be scheduled or sleep. Change-Id: I45baf51b96506e4df6290b74c3a033240f8a1a83 Signed-off-by: Yonghua Yan Reviewed-on: https://gerrit.mot.com/2293617 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang Submit-Approved: Jira Key --- drivers/moto_f_usbnet/f_usbnet.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/moto_f_usbnet/f_usbnet.c b/drivers/moto_f_usbnet/f_usbnet.c index e53f39d9f0bf..54ed5c4db4cb 100644 --- a/drivers/moto_f_usbnet/f_usbnet.c +++ b/drivers/moto_f_usbnet/f_usbnet.c @@ -846,9 +846,6 @@ static void do_set_config(struct usb_function *f, u16 new_config) context->subnet_mask = 0; context->router_ip = 0; context->iff_flag = 0; - sysfs_notify(&context->dev->dev.kobj, NULL, "ip_addr"); - sysfs_notify(&context->dev->dev.kobj, NULL, "subnet_mask"); - sysfs_notify(&context->dev->dev.kobj, NULL, "iff_flag"); schedule_work(&context->usbnet_config_wq); } } @@ -881,12 +878,10 @@ static int usbnet_ctrlrequest( case USBNET_SET_IP_ADDRESS: context->ip_addr = (wValue << 16) | wIndex; rc = 0; - sysfs_notify(&context->dev->dev.kobj, NULL, "ip_addr"); break; case USBNET_SET_SUBNET_MASK: context->subnet_mask = (wValue << 16) | wIndex; rc = 0; - sysfs_notify(&context->dev->dev.kobj, NULL, "subnet_mask"); break; case USBNET_SET_HOST_IP: context->router_ip = (wValue << 16) | wIndex; @@ -899,7 +894,6 @@ static int usbnet_ctrlrequest( if (context->ip_addr && context->subnet_mask && context->router_ip) { context->iff_flag = IFF_UP; - sysfs_notify(&context->dev->dev.kobj, NULL, "iff_flag"); /* schedule a work queue to do this because we need to be able to sleep */ schedule_work(&context->usbnet_config_wq);