From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755986AbdIHIQU (ORCPT ); Fri, 8 Sep 2017 04:16:20 -0400 Received: from mga06.intel.com ([134.134.136.31]:13888 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753645AbdIHIQS (ORCPT ); Fri, 8 Sep 2017 04:16:18 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,360,1500966000"; d="scan'208";a="898311650" Date: Fri, 8 Sep 2017 11:07:29 +0300 From: Mika Westerberg To: Mario Limonciello Cc: dvhart@infradead.org, LKML , platform-driver-x86@vger.kernel.org, Richard Hughes , Yehezkel Bernat Subject: Re: [PATCH v2] Add driver to force WMI Thunderbolt controller power status Message-ID: <20170908080729.GT2477@lahna.fi.intel.com> References: <1504810042-4696-1-git-send-email-mario.limonciello@dell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1504810042-4696-1-git-send-email-mario.limonciello@dell.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 07, 2017 at 01:47:22PM -0500, Mario Limonciello wrote: I have a small comment which you might want to consider. > +static int intel_wmi_thunderbolt_probe(struct wmi_device *wdev) > +{ > + return sysfs_create_group(&wdev->dev.kobj, &tbt_attribute_group); > +} > + > +static int intel_wmi_thunderbolt_remove(struct wmi_device *wdev) > +{ > + sysfs_remove_group(&wdev->dev.kobj, &tbt_attribute_group); > + return 0; > +} In order to notify userspace about this, what if you send KOBJ_CHANGE for the wdev when you add/remove this attribute?