All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2, 5/7] cdmamodem: Add CDMA SMS driver support
Date: Wed, 05 Jan 2011 11:52:29 -0600	[thread overview]
Message-ID: <4D24AFDD.7040505@gmail.com> (raw)
In-Reply-To: <4D24B038.2040200@nokia.com>

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

Hi Lei,

>>> +
>>> +    data->vendor = vendor;
>>> +
>>> +    ofono_cdma_sms_set_data(cdma_sms, data);
>>> +
>>> +    at_sms_initialized(cdma_sms);
>>
>> Currently it is not possible to call the register method from within
>> probe.  So you need to either use g_idle_add or run an AT command before
>> registering the cdma_sms atom.  See how other drivers do this.
>>
> 
> Will fix. Could you pls explain why it is not possible to do this sync
> way but have to force this into async? I have tested and it worked. Or
> this is just a general architecture rule between atom and driver?
> 

This is a general rule.  The core atom implementation reserves the right
to start calling driver functions as soon as the atom is registered.  If
the atom is registered within probe, then atom driver is still NULL.
This results in a crash.

Regards,
-Denis

      reply	other threads:[~2011-01-05 17:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22  0:02 [PATCH v2, 5/7] cdmamodem: Add CDMA SMS driver support Lei Yu
2011-01-04 21:22 ` Denis Kenzior
2011-01-05 17:54   ` Lei Yu
2011-01-05 17:52     ` Denis Kenzior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D24AFDD.7040505@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.