static void br_work(struct work_struct *work)
 {
-       struct fw_card *card = container_of(work, struct fw_card, br_work.work);
+       struct fw_card *card = from_work(card, work, br_work.work);
 
        /* Delay for 2s after last reset per IEEE 1394 clause 8.2.1. */
        if (card->reset_jiffies != 0 &&
 
 static void bm_work(struct work_struct *work)
 {
-       struct fw_card *card = container_of(work, struct fw_card, bm_work.work);
+       struct fw_card *card = from_work(card, work, bm_work.work);
        struct fw_device *root_device, *irm_device;
        struct fw_node *root_node;
        int root_id, new_root_id, irm_id, bm_id, local_id;
 
 static void iso_resource_work(struct work_struct *work)
 {
        struct iso_resource_event *e;
-       struct iso_resource *r =
-                       container_of(work, struct iso_resource, work.work);
+       struct iso_resource *r = from_work(r, work, work.work);
        struct client *client = r->client;
        unsigned long index = r->resource.handle;
        int generation, channel, bandwidth, todo;
 
 
 static void fw_device_shutdown(struct work_struct *work)
 {
-       struct fw_device *device =
-               container_of(work, struct fw_device, work.work);
+       struct fw_device *device = from_work(device, work, work.work);
 
        if (time_before64(get_jiffies_64(),
                          device->card->reset_jiffies + SHUTDOWN_DELAY)
 
 static void fw_device_update(struct work_struct *work)
 {
-       struct fw_device *device =
-               container_of(work, struct fw_device, work.work);
+       struct fw_device *device = from_work(device, work, work.work);
 
        fw_device_cdev_update(device);
        device_for_each_child(&device->device, NULL, update_unit);
 
 static void fw_device_init(struct work_struct *work)
 {
-       struct fw_device *device =
-               container_of(work, struct fw_device, work.work);
+       struct fw_device *device = from_work(device, work, work.work);
        struct fw_card *card = device->card;
        struct device *found;
        u32 minor;
 
 static void fw_device_refresh(struct work_struct *work)
 {
-       struct fw_device *device =
-               container_of(work, struct fw_device, work.work);
+       struct fw_device *device = from_work(device, work, work.work);
        struct fw_card *card = device->card;
        int ret, node_id = device->node_id;
        bool changed;
 
 static void fw_device_workfn(struct work_struct *work)
 {
-       struct fw_device *device = container_of(to_delayed_work(work),
-                                               struct fw_device, work);
+       struct fw_device *device = from_work(device, to_delayed_work(work), work);
        device->workfn(work);
 }