unsigned long action, void *_arg)
 {
        struct memory_tier *memtier;
-       struct memory_notify *arg = _arg;
-
-       /*
-        * Only update the node migration order when a node is
-        * changing status, like online->offline.
-        */
-       if (arg->status_change_nid < 0)
-               return notifier_from_errno(0);
+       struct node_notify *nn = _arg;
 
        switch (action) {
-       case MEM_OFFLINE:
+       case NODE_REMOVED_LAST_MEMORY:
                mutex_lock(&memory_tier_lock);
-               if (clear_node_memory_tier(arg->status_change_nid))
+               if (clear_node_memory_tier(nn->nid))
                        establish_demotion_targets();
                mutex_unlock(&memory_tier_lock);
                break;
-       case MEM_ONLINE:
+       case NODE_ADDED_FIRST_MEMORY:
                mutex_lock(&memory_tier_lock);
-               memtier = set_node_memory_tier(arg->status_change_nid);
+               memtier = set_node_memory_tier(nn->nid);
                if (!IS_ERR(memtier))
                        establish_demotion_targets();
                mutex_unlock(&memory_tier_lock);
        nodes_and(default_dram_nodes, node_states[N_MEMORY],
                  node_states[N_CPU]);
 
-       hotplug_memory_notifier(memtier_hotplug_callback, MEMTIER_HOTPLUG_PRI);
+       hotplug_node_notifier(memtier_hotplug_callback, MEMTIER_HOTPLUG_PRI);
        return 0;
 }
 subsys_initcall(memory_tier_init);