summaryrefslogtreecommitdiff
path: root/drivers/rapidio
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-02 20:58:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-03 22:42:52 +0300
commit2243acd50ac4026e93ac4f024109be6dbd7f9098 (patch)
tree772d929a3d72fb0b0c6b374aa0cc5b2424407bae /drivers/rapidio
parent6b0d49be81cf4f1cf30ebd079cbf4643cab0a01d (diff)
downloadlinux-2243acd50ac4026e93ac4f024109be6dbd7f9098.tar.xz
driver core: class: remove struct class_interface * from callbacks
The add_dev and remove_dev callbacks in struct class_interface currently pass in a pointer back to the class_interface structure that is calling them, but none of the callback implementations actually use this pointer as it is pointless (the structure is known, the driver passed it in in the first place if it is really needed again.) So clean this up and just remove the pointer from the callbacks and fix up all callback functions. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: Kurt Schwemmer <kurt.schwemmer@microsemi.com> Cc: Jon Mason <jdmason@kudzu.us> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Allen Hubbe <allenbh@gmail.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Alexandre Bounine <alex.bou9@gmail.com> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Doug Gilbert <dgilbert@interlog.com> Cc: John Stultz <jstultz@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Wang Weiyang <wangweiyang2@huawei.com> Cc: Yang Yingliang <yangyingliang@huawei.com> Cc: Jakob Koschel <jakobkoschel@gmail.com> Cc: Cai Xinchen <caixinchen1@huawei.com> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Acked-by: Logan Gunthorpe <logang@deltatee.com> Link: https://lore.kernel.org/r/2023040250-pushover-platter-509c@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rapidio')
-rw-r--r--drivers/rapidio/devices/rio_mport_cdev.c7
-rw-r--r--drivers/rapidio/rio_cm.c8
2 files changed, 4 insertions, 11 deletions
diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c
index deb96c3160a7..a115730ebf14 100644
--- a/drivers/rapidio/devices/rio_mport_cdev.c
+++ b/drivers/rapidio/devices/rio_mport_cdev.c
@@ -2536,10 +2536,8 @@ static void mport_cdev_remove(struct mport_dev *md)
/*
* mport_add_mport() - Add rio_mport from LDM device struct
* @dev: Linux device model struct
- * @class_intf: Linux class_interface
*/
-static int mport_add_mport(struct device *dev,
- struct class_interface *class_intf)
+static int mport_add_mport(struct device *dev)
{
struct rio_mport *mport = NULL;
struct mport_dev *chdev = NULL;
@@ -2559,8 +2557,7 @@ static int mport_add_mport(struct device *dev,
* mport_remove_mport() - Remove rio_mport from global list
* TODO remove device from global mport_dev list
*/
-static void mport_remove_mport(struct device *dev,
- struct class_interface *class_intf)
+static void mport_remove_mport(struct device *dev)
{
struct rio_mport *mport = NULL;
struct mport_dev *chdev;
diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c
index acaf9cda014c..49f8d111e546 100644
--- a/drivers/rapidio/rio_cm.c
+++ b/drivers/rapidio/rio_cm.c
@@ -2087,13 +2087,11 @@ static int riocm_cdev_add(dev_t devno)
/*
* riocm_add_mport - add new local mport device into channel management core
* @dev: device object associated with mport
- * @class_intf: class interface
*
* When a new mport device is added, CM immediately reserves inbound and
* outbound RapidIO mailboxes that will be used.
*/
-static int riocm_add_mport(struct device *dev,
- struct class_interface *class_intf)
+static int riocm_add_mport(struct device *dev)
{
int rc;
int i;
@@ -2166,14 +2164,12 @@ static int riocm_add_mport(struct device *dev,
/*
* riocm_remove_mport - remove local mport device from channel management core
* @dev: device object associated with mport
- * @class_intf: class interface
*
* Removes a local mport device from the list of registered devices that provide
* channel management services. Returns an error if the specified mport is not
* registered with the CM core.
*/
-static void riocm_remove_mport(struct device *dev,
- struct class_interface *class_intf)
+static void riocm_remove_mport(struct device *dev)
{
struct rio_mport *mport = to_rio_mport(dev);
struct cm_dev *cm;