From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752246AbcGFC5P (ORCPT ); Tue, 5 Jul 2016 22:57:15 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:36345 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbcGFC5N (ORCPT ); Tue, 5 Jul 2016 22:57:13 -0400 From: Viresh Kumar To: Wolfram Sang , Jean Delvare Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, Johan Hovold , Alex Elder , Viresh Kumar Subject: [PATCH 0/2] i2c-dev: Don't let userspace block adapter Date: Tue, 5 Jul 2016 19:57:05 -0700 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram/Jean, I am part of the kernel team for Google's projectara [1], where we are building a module smart phone. This series tries to fix one of the problems we hit on our system as we are required to hotplug pretty much every thing on the phone and so this fixes hotplug issues with i2c-dev. As described in the second patch, the current implementation of i2c-dev file operations doesn't let the modules (hardware attached to the phone) eject from the phone as the cleanup path for the module hasn't finished yet (i2c adapter not removed). We can't let the userspace block the kernel devices forever in such cases. I was able to test them on the ARA phone with kernel 3.10 only and not mainline. -- viresh [1] https://atap.google.com/ara/ Viresh Kumar (2): i2c-dev: don't get i2c adapter via i2c_dev i2c-dev: Don't block the adapter from unregistering drivers/i2c/i2c-dev.c | 79 ++++++++++++++++++++++++++++++++++++++++++--------- include/linux/i2c.h | 1 + 2 files changed, 67 insertions(+), 13 deletions(-) -- 2.7.4