Merge tag 'driver-core-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-block.git] / include / linux / firewire.h
index 56505436d1590ca7d043bf80238681742cc86cd0..1716c01c4e5410f26a4d9d5180cc59ccfb50cd3c 100644 (file)
@@ -208,10 +208,7 @@ struct fw_device {
        struct fw_attribute_group attribute_group;
 };
 
-static inline struct fw_device *fw_device(struct device *dev)
-{
-       return container_of(dev, struct fw_device, device);
-}
+#define fw_device(dev) container_of_const(dev, struct fw_device, device)
 
 static inline int fw_device_is_shutdown(struct fw_device *device)
 {
@@ -229,10 +226,7 @@ struct fw_unit {
        struct fw_attribute_group attribute_group;
 };
 
-static inline struct fw_unit *fw_unit(struct device *dev)
-{
-       return container_of(dev, struct fw_unit, device);
-}
+#define fw_unit(dev)   container_of_const(dev, struct fw_unit, device)
 
 static inline struct fw_unit *fw_unit_get(struct fw_unit *unit)
 {
@@ -246,10 +240,7 @@ static inline void fw_unit_put(struct fw_unit *unit)
        put_device(&unit->device);
 }
 
-static inline struct fw_device *fw_parent_device(struct fw_unit *unit)
-{
-       return fw_device(unit->device.parent);
-}
+#define fw_parent_device(unit) fw_device(unit->device.parent)
 
 struct ieee1394_device_id;