@@ -395,24 +395,24 @@ static void unregister_dev_dax(void *dev)
395395 put_device (dev );
396396}
397397
398- struct dev_dax * __devm_create_dev_dax (struct dax_region * dax_region , int id ,
399- struct dev_pagemap * pgmap , enum dev_dax_subsys subsys )
398+ struct dev_dax * devm_create_dev_dax (struct dev_dax_data * data )
400399{
400+ struct dax_region * dax_region = data -> dax_region ;
401401 struct device * parent = dax_region -> dev ;
402402 struct dax_device * dax_dev ;
403403 struct dev_dax * dev_dax ;
404404 struct inode * inode ;
405405 struct device * dev ;
406406 int rc = - ENOMEM ;
407407
408- if (id < 0 )
408+ if (data -> id < 0 )
409409 return ERR_PTR (- EINVAL );
410410
411411 dev_dax = kzalloc (sizeof (* dev_dax ), GFP_KERNEL );
412412 if (!dev_dax )
413413 return ERR_PTR (- ENOMEM );
414414
415- memcpy (& dev_dax -> pgmap , pgmap , sizeof (* pgmap ));
415+ memcpy (& dev_dax -> pgmap , data -> pgmap , sizeof (struct dev_pagemap ));
416416
417417 /*
418418 * No 'host' or dax_operations since there is no access to this
@@ -438,13 +438,13 @@ struct dev_dax *__devm_create_dev_dax(struct dax_region *dax_region, int id,
438438
439439 inode = dax_inode (dax_dev );
440440 dev -> devt = inode -> i_rdev ;
441- if (subsys == DEV_DAX_BUS )
441+ if (data -> subsys == DEV_DAX_BUS )
442442 dev -> bus = & dax_bus_type ;
443443 else
444444 dev -> class = dax_class ;
445445 dev -> parent = parent ;
446446 dev -> type = & dev_dax_type ;
447- dev_set_name (dev , "dax%d.%d" , dax_region -> id , id );
447+ dev_set_name (dev , "dax%d.%d" , dax_region -> id , data -> id );
448448
449449 rc = device_add (dev );
450450 if (rc ) {
@@ -464,7 +464,7 @@ struct dev_dax *__devm_create_dev_dax(struct dax_region *dax_region, int id,
464464
465465 return ERR_PTR (rc );
466466}
467- EXPORT_SYMBOL_GPL (__devm_create_dev_dax );
467+ EXPORT_SYMBOL_GPL (devm_create_dev_dax );
468468
469469static int match_always_count ;
470470
0 commit comments